Skip to content Skip to sidebar Skip to footer

Cannot Authenticate Using Oauth 2.0 In Google Calendar (v3) Api In Javascript

I am attempting to create Google Calendar events as per the code given at here. I've narrowed the probem down to an authentication issue in the following call: which does not ret

Solution 1:

I had discovered that popups were blocked in my browser and this prevented the authentication process from completing. Once I enabled popups, the process was able to complete successfully. Doh! The code was complete and OK after all.

Solution 2:

Wierd. Looks like Google doesn't like your credentials.

  1. Have you remembered to call gapi.client.setApiKey(apiKey) before trying gapi.auth.authorize()?

  2. Are apiKey and clientId both defined and in scope? If you're not sure, try sticking alert(apiKey + '\n' + clientId) or console.log(apiKey, clientId) in the same function.

Post a Comment for "Cannot Authenticate Using Oauth 2.0 In Google Calendar (v3) Api In Javascript"