Join the #BuildWithBuildAgent Challenge! Get recognized, earn exclusive swag, and inspire the ServiceNow Community with what you can build using Build Agent.  Join the Challenge.

How to automatically extend access token for grant type authorization code?

sandhya64u57jtj
Tera Contributor

Hi,

I have a requirement of OneDrive Integration with ServiceNow.
I have followed https://docs.servicenow.com/bundle/xanadu-integrate-applications/page/administer/integrationhub-stor...
and setup is completed.
So, once I generate OAuth token in oauth_2_0_credentials I can see Refresh token and Access token.  Refresh token is valid for around 3 months but access token is valid for 1 hour.
Every time after an hour I have to manually click on "get oauth token" to generate new access token.

Please help me to automate this generation of access token. 
I have referred below scripts but its not working. Please help.
https://support.servicenow.com/kb?id=kb_article_view&sysparm_article=KB0791131
https://support.servicenow.com/kb?id=kb_article_view&sysparm_article=KB0823628


0 REPLIES 0