How to pass access token dynamically in Outbound Rest API message
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-03-2019 10:37 PM
Hi Everyone,
We need to pass access token value through a post API from one end point to another POST Rest API.
Can someone look into this ?
- Labels:
-
Service Catalog

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-04-2019 04:19 AM
Hi Katchi,
Use the Variable Substitutions in REST Message. Get the token in your script by and assign it to the parameter in the second one. Depending on where in the message you need to put the token (query parameter, header, content) instead of the value use the variable e.g. ${token}
If my answer helped you in any way, please then mark it as helpful. If this solved your case please mark it as a correct answer. Thank You.
Best regards,
Łukasz
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-04-2019 09:15 PM
Found, this post https://community.servicenow.com/community?id=community_blog&sys_id=d547f492db61d300fc5b7a9e0f9619d2 helpful.
Thank you for replying.