Oauth access token gets expired

Steffi Elizabet
Kilo Explorer

Hi Team,

 

I have done an oauth Integration. My integration works when I click the related link "Get Oauth Token" but will not in any of the following means:

 

- Created an outbound when I click on test I receive the access token

- Followed all the community provided means to automate it

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

https://community.servicenow.com/community?id=community_question&sys_id=5a6b63fc1bd860103222ea89bd4bcbd9

- Used the below url to manually add/update

I receive the access token and record gets created in "Manage tokens" but when I use the code and test it will not works. It works only through the code "get oauth token" related link. Any suggestions would be helpful.

Regards,

 

Steffi

@Ankur Bawiskar  @Anil Lande  Any insights on this?

2 REPLIES 2

Ankur Bawiskar
Tera Patron
Tera Patron

Hi,

you need to get the access token and immediately use the same in actual API endpoint.

refer below link on how to get the access token and refresh token from script

https://hi.service-now.com/kb_view.do?sysparm_article=KB0791131

Regards
Ankur

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

Hi Ankur,

 

I tried this I am getting the access token. However, client has created token after hitting their URL through their postman if I use that code in variable and pass it in the header as bearer it is not accepting. Any idea?