How to set access token in Http Request

shaik23
Tera Expert

Hi all,

i have started exploring Integrations.

 

How to set access token stored in system properites in to Http request please guide me in detail.

shaik23_0-1755695181623.png

shaik23_2-1755695207668.png

 

shaik23_1-1755695202660.png

i have tried hardcode value in bearer its working i want them dynamically.

 

1 ACCEPTED SOLUTION

@shaik23 

Hope you are doing good.

Did my reply answer your question?

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

15 REPLIES 15

Dr Atul G- LNG
Tera Patron
Tera Patron

Hi @shaik23 

 

https://www.servicenow.com/docs/bundle/zurich-platform-security/page/administer/security/task/t_Mana...

https://www.servicenow.com/community/itsm-forum/how-to-auto-regenerate-access-token/td-p/2980954

*************************************************************************************************************
If my response proves useful, please indicate its helpfulness by selecting " Accept as Solution" and " Helpful." This action benefits both the community and me.

Regards
Dr. Atul G. - Learn N Grow Together
ServiceNow Techno - Functional Trainer
LinkedIn: https://www.linkedin.com/in/dratulgrover
YouTube: https://www.youtube.com/@LearnNGrowTogetherwithAtulG
Topmate: https://topmate.io/atul_grover_lng [ Connect for 1-1 Session]

****************************************************************************************************************

Hi @Dr Atul G- LNG 
i am able to generate acess token automatically and those are stored in system properties but how to set them in Http headers

Ankur Bawiskar
Tera Patron
Tera Patron

@shaik23 

You can variable substitution and then get the token and set it

Variable substitution in outbound REST messages 

OR

you can set the header directly using RESTMessageV2

Mastering Headers in ServiceNow RESTMessageV2 

AnkurBawiskar_0-1755695635785.png

 

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

Hi @Ankur Bawiskar 
the script you shared where it should execute BR or script include ?