Need to generate refresh token via script for Grant type "Authorization Code" Oauth profile

Ashish Arovind2
Tera Contributor

Hi Everyone

 

We are currently facing a situation where the refresh token time span is 1 hours and if the integration is not triggered within that time the refresh token expires. The OAuth profile grant type is "Authorization Code" so every time the refresh token expires we have to manually enter the credentials and generate the tokens again.

 

I am currently referring this kb article and script but it is not working for me. I am running this script only for my rest message and it is only picking the oauth profile linked to my rest message.

https://support.servicenow.com/kb?id=kb_article_view&sysparm_article=KB0823628

 

Error I am getting is: 

Script: No OAuth refresh token for Rest Message. Manual reauthorization required. Account="Snowflake Remove User": no thrown error

 

I checked in managed tokens table and the refresh token is active.

Thanks in advance.

 

@Ankur Bawiskar 
Regards

Ashish Arovind Raj

 

0 REPLIES 0