Access Token Refresh Issue
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-30-2025 05:52 AM
Hi All,
Can you help me with the below issue?
We are not able to get the access token using refresh token, after sometime access token is getting expired and the record is getting deleted from oauth_credential table
Thanks and Regards,
Monalisha

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-30-2025 05:58 AM - edited 07-30-2025 05:58 AM
Hi @MonalishaK
The typical oauth fllow for this is is to first authenticate with client id, client secret, etc, you'll receive 2 types of tokens. One is the access token one is the refresh token. An access token lifespan is often only valid for 30 minutes up to an hour. The Oath script should validate the expiration date of the access token. If the access token is expired, a request is made using the refresh token to get a new access token.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-30-2025 06:01 AM
if your refresh token is having longer expiration and that date has not yet reached then you should be able to generate fresh access token using refresh token.
If refresh token is expired then you need to make a fresh call with credentials to 3rd party to get the refresh token.
If my response helped please mark it correct and close the thread so that it benefits future readers.
Ankur
✨ Certified Technical Architect || ✨ 9x ServiceNow MVP || ✨ ServiceNow Community Leader