Hey @Gracias
From the video, the Google Calendar connection is expiring immediately after connection, which tells us that likely one of the parameters included is not correct.
I suggest checking the API documentation and ensuring that you’re including only the appropriate parameters each request expects - for example, you wouldn’t usually need a refresh_token
included in the test request.
You’d also want to use a different test endpoint - currently you’re using https://oauth2.googleapis.com/token which looks like the endpoint where you request an access token - test endpoints are usually those that require no configuration, so for example, rather use https://www.googleapis.com/calendar/v3/users/me/settings (notw this will still not work if the parameters being used in the authorization request are not corrected).
We’ve also got this guide published to help with Oauth 2 setup here: https://platform.zapier.com/docs/oauth#how-to-add-oauth-v2-to-a-zapier-integration
I removed all the parameters from test endpoint https://prnt.sc/GTTs_60woA6L
Still getting the same issue
Hi @Gracias!
Thank you for making those adjustments to the test endpoint. The URL previously being used would almost certainly have caused problems.
Digging further into the error message in the screenshot, it looks like Google isn’t returning a refresh token:
Zapier will need to receive a refresh token from Google if you have this set in your app settings:
I’d recommend taking a look at the “Monitoring” section for your app. If you open up the most recent authentication.oauth2Config.getAccessToken event (should be the same time as the error), you’ll be able to view the data that Google is returning in the “Output” section.
If Google isn’t returning a refresh token, it could be because Google only does this on the first (initial) connection attempt, as per the details here: https://developers.google.com/identity/protocols/oauth2/web-server#exchange-authorization-code
Could you try one (or both) of the suggestions here to see if they help? https://stackoverflow.com/a/10857806
Once you’ve done either of those, Google should return a refresh token which should fix the error you’ve been seeing.
If that doesn’t fix the error or you see a different error, please could you post screenshots from “Monitoring” of the relevant events (with any private or personal information removed)?
Thanks!
Hi @iansco,
Now refresh_token issue resolved. But “This account is expired.Please reconnect it here.” message still exists…
https://prnt.sc/7-d9Nu-E1vcU
Please check the following link for Monitoring Page result
https://www.awesomescreenshot.com/video/12156411?key=0ec520dfaf851ecf80116f0a478fd872
Thanks!
Hi @Gracias,
The details from the “Monitoring” page show a Response needs to be JSON
error when calling the “Test” endpoint, so it looks like the endpoint isn’t returning JSON data.
If you check the details on one of those events, you should be able to view the response data being returned and confirm whether that’s the case.
If the “Test” endpoint isn’t returning JSON data, you’ll need to use a different API endpoint that does: https://developers.google.com/calendar/api/v3/reference
The URL @MarinaH mentioned above does return JSON data, if you’d like to give that a try: https://www.googleapis.com/calendar/v3/users/me/settings
Hi @Gracias
please check this video
https://www.googleapis.com/calendar/v3/users/me/settings
I’m not seeing a link to a video in your latest post but if you post that link again and/or some screenshots that show details of the error, we’ll be able to take a look for you
In the meantime, if you haven’t done so already, I’d recommend checking the “Monitoring” page from your app and then 1) searching this forum and 2) checking the Zapier help docs for the error message.
Note: the “Monitoring” page will show you the full details of the requests your app is making, along with the responses that the API is sending back. So if you’re getting an error back from the Google API, please do also 1) check their documentation for the error and also 2) make sure that the correct parameters and values are being sent in all requests that are being made from your Zapier app.
In case it’s useful, on an app that has been built using our visual builder (rather than the CLI), you can view all the “URL Parameters” and “HTTP Header” values that are being sent by clicking the “Show Options” link on each request: