How to generate access token from refresh token.

venkata sai alu
Tera Contributor

I am able get refresh token through script include, but unable to generate access token in script include from refresh token. how can i generate access token from refresh token in script include?

1 ACCEPTED SOLUTION

Ankur Bawiskar
Tera Patron
Tera Patron

@venkata sai alu 

I will recommend to get a fresh access token and refresh token each time you make an API call

check these links

OAuth2.0: Get new Access Token from existing Refresh Token

How to Setup OAuth2 authentication for outbound RESTMessageV2 integrations

OAuth : Script to Automate Token Request

How to generate the access token once it is expired from Business Rule?

How to get Auth Token using script when grant type is Authorization code

If my response helped please mark it correct and close the thread so that it benefits future readers.

Regards,
Ankur
Certified Technical Architect  ||  9x ServiceNow MVP  ||  ServiceNow Community Leader

View solution in original post

1 REPLY 1

Ankur Bawiskar
Tera Patron
Tera Patron

@venkata sai alu 

I will recommend to get a fresh access token and refresh token each time you make an API call

check these links

OAuth2.0: Get new Access Token from existing Refresh Token

How to Setup OAuth2 authentication for outbound RESTMessageV2 integrations

OAuth : Script to Automate Token Request

How to generate the access token once it is expired from Business Rule?

How to get Auth Token using script when grant type is Authorization code

If my response helped please mark it correct and close the thread so that it benefits future readers.

Regards,
Ankur
Certified Technical Architect  ||  9x ServiceNow MVP  ||  ServiceNow Community Leader