How to to get the automated refresh token through get auth token
Community Alums
Not applicable
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-25-2025 11:53 PM
Hi I'm able to get the authorization token manually but i wanted to automate this process for grant type authorization code
1 REPLY 1
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-29-2025 03:33 AM
Hi @Community Alums ,
Can you check this - https://support.servicenow.com/kb?id=kb_article_view&sysparm_article=KB2058755
- Initial manual authorization: You perform the authorization code grant flow manually one time to obtain both an access token and a refresh token.
- Store the refresh token: The refresh token has a much longer lifespan than the access token. You must securely store this token, which is a sensitive credential.
- Automate access token retrieval: When your access token expires, your automated script or application uses the refresh token to request a new access token from the /oauth_token.do endpoint. This can be done programmatically with a POST request and requires no user interaction.
If I could help you with your Query then, please hit the Thumb Icon and mark as Correct !!
Thanks, GP
