We've updated the ServiceNow Community Code of Conduct, adding guidelines around AI usage, professionalism, and content violations. Read more

How to to get the automated refresh token through get auth token

Not applicable

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

G Ponsekar
Tera Guru

Hi @Community Alums ,

 

Can you check this - https://support.servicenow.com/kb?id=kb_article_view&sysparm_article=KB2058755

 

  1. Initial manual authorization: You perform the authorization code grant flow manually one time to obtain both an access token and a refresh token.
  2. 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.
  3. 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