Reputation: 279
I am currently working with Google Calendar API and try to get calendar list by using postman, but I don't know its standard format. I try to give it the Authorization header.
GET /calendar/v3/users/me/calendarList?key=AIzaSyD-a9IF8KKYgoC3cpgS-Al7hLQDbugrDcw HTTP/1.1
Host: www.googleapis.com
Content-Type: application/json
Authorization: Bearer ya29.Glw2BZv7G1Yq9uOk1YoDeRt3N6A_QehUexSRriiVc9Vu9Jn5uPeVZMbqa41xuFJtTbal-kZo0USmBw-JtxMnYR8tAFUnVPiSuZMsiKavV0F9u2sZ3KpvZiDUxv3r3Q
Cache-Control: no-cache
Postman-Token: 28c59154-4267-f007-a627-64a19e8bb6ec
The first time I receive usage limit error, and second time is Invalid Credentials error, I am really sure that the token is right. Because of don't know that the request is right or not so I don't know how to resolve it. Please help me.
Upvotes: 3
Views: 6473
Reputation: 201378
In your situation, when you use access token, the query of key={YOUR_API_KEY}
is not required. Please use GET https://www.googleapis.com/calendar/v3/users/me/calendarList
as the endpoint.
Even if you modified above, when the same error occurs, can you confirm following points again?
https://www.googleapis.com/auth/calendar.readonly
or https://www.googleapis.com/auth/calendar
have to be included to the scope.https://console.cloud.google.com/apis/library/calendar-json.googleapis.com/?q=calendar&project=project-id-#####
.#####
to your project ID.If this was not useful for you, I'm sorry.
Upvotes: 2