OAuth token lasts for 30 minutes

prakhar_yadav
Tera Contributor

We need to manually click on "Get Oauth token" in related links after every 30 mins as it last for that much time only. Is there a way so that, this process can be automated, if YES, please help by guiding step by step. Thanks in advance

7 REPLIES 7

Sujatha V M
Kilo Patron
Kilo Patron

@prakhar_yadavPlease follow the steps from 17 to 23 in the below article, 

 

https://www.servicenow.com/community/architect-forum/google-calendar-integration-with-servicenow/m-p...

 

Please mark this as helpful and accept it as a solution if this resolves your query.

Thanks,

Sujatha V.M.

Please mark this as helpful and accept it as a solution if this resolves your query.
Sujatha V.M.

Ankur Bawiskar
Tera Patron
Tera Patron

@prakhar_yadav 

refer this link and use script to get the OAuth token and then hit the actual end point with this token

Script to retrieve Access and Refresh tokens using GlideOAuthClient libraries 

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

Amit Pandey
Kilo Sage

Hi @prakhar_yadav 

 

What is the grant_type you're using?

 

Regards,

Amit

Hi @Amit Pandey 

 

Grant Type is Authorization code