Access and refresh tokens
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎05-12-2022 03:34 AM
We manage the tokens used to connect to Google Calendar from ServiceNow.
As shown in the image below, it manages access and refresh tokens, with access tokens expiring in 30 minutes and refresh tokens expiring in 24855 days.
It is recognized that the access token will be regenerated by the refresh token when it expires, so there is no error.
However, the following error seems to occur due to the expiration of the access token.
ProcessingException: User Not Authenticated. Could not retrieve a new access token with the refresh token. invalid_grant, Token has been expired or revoked.
Why is this? Am I understanding this incorrectly?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎05-12-2022 03:43 AM
Hi,
was this working fine earlier?
which grant type are you using?
Regards
Ankur
Ankur
✨ Certified Technical Architect || ✨ 9x ServiceNow MVP || ✨ ServiceNow Community Leader
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎05-12-2022 05:54 PM
Hi Ankur.
Thank you for your answer.
Yes, I am looking for a new product. It used to work well.
It still works fine, but after a few days of getting the token from the following screen, it stops working properly and the above error appears.
Grant type is Authorization Code.
Is there something wrong with my settings?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎05-12-2022 06:42 PM
Hello miyu,
Are you able to manually perform a token refresh?
Also, please update your Token URL to https://www.googleapis.com/oauth2/v4/token as shown in the documentation for IntegrationHub with Google Calendar - yours being on v3 may be causing an unknown issue. Also, validate the remainder of your Application Registry settings.
Lastly, if your company is entitled to IntegrationHub I would utilize the spoke for this integration as shown in the remainder of the documentation.
Please mark my answer as correct/helpful if it has helped you.
Thanks,
Logan
--
LinkedIn
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎05-16-2022 12:22 AM
Hi Logan
Thank you for your reply.
As you answered, I changed the URL of the token from v3 to v4.
However, after changing to v4, the connection to Google Calendar is no longer possible.
Do I need to change any other settings?