Get access token from authorization code for REST Oauth 2.0 integration

Wirasat
Tera Guru

Hi,

I have created an application registry entry for ServiceNow to connect to third party application. 

I need to get access token dynamically through script for REST API Oauth 2.0 integration as this access token expires every 30 minutes. I see scripts for grant type "Resource Owner Password Credentials" but couldn't find any script for grant type Authorization Code. 

 

Wirasat_0-1692033111304.png

 

1 REPLY 1

Mark A_ Miller
Mega Sage

I found that in order to select the grant type, I needed to modify the form layout on the Application Registry form by adding the Default Grant Type field.

Screenshot 2023-12-15 at 06.38.25.png