Google Calendar Api - 403 Error
I am attempting to set up an application using the Google Calendar API. I set up all the credentials and set the authorized JavaScript page equal to http://localhost:8000 as sugges
Solution 1:
Google calendar uses Oauth2.0 for authorization. There are three essential components of this. If any of these are missing, authorization will not happen properly and you'll get a 403.
- Access token - the google calendar API saves an access token to your /.credentials folder by default. Your application will need to be able to read this file (wherever it may be), otherwise you will have to manually authorize API calls with every request.
- client_secret.json - this is a necessary file to authorize your application itself as a client of google. When you created a clientID and such using the google developer portal, this file was created, and must also be read by your application.
- Scopes - The scope is what level of access you have. It is by default in the quickstart set to "read-only", which could be why you're getting 403. If you want to change the scope, you're going to have to edit both the line of code in the quickstart and either modify the access token or get a new one to reflect that change.
I have gotten this error before, but that was before I understood Oauth2. If the problem isn't in any of these, it's likely something that you selected in the developer console. Let me know if you are still stuck.
Solution 2:
Based from this thread, try setting the Referrers
to Any referrer allowed
for your project (just leave the field empty) in the Google Developers Console if it is not already like that.
To do this, go to your Google Developers Console and open API & Auth / Credentials and click Edit allowed referrers
empty the input field.
Additional reference:
- Google Calendar API v3 Access Not Configured
- 403 error with message:Access Not Configured. Please use Google Developers Console to activate the API for your project
- Access Not Configured. The API (Google+ API) is not enabled for your project. Please use the Google Developers Console to update your configuration
Post a Comment for "Google Calendar Api - 403 Error"