Is it okay to pass Bearer token through script despite it deals automatically in REST message??
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-27-2025 07:11 AM
I have opted OAuth authentication in Rest message whenever I am calling the rest message automatically validates token if it expired it gets new token if not it will use the existed token.
But third party asking me to send bearer token separately through body or header? Is that works? Is it best practice sending bearer token again whenever making rest call?
How to get this bearer token when I am using client ID credentials method?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-27-2025 07:49 AM
it's recommended to take the access token as 1st API call everytime and then in the subsequent call use that Access token as Bearer token in header
If my response helped please mark it correct and close the thread so that it benefits future readers.
Ankur
✨ Certified Technical Architect || ✨ 9x ServiceNow MVP || ✨ ServiceNow Community Leader
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-27-2025 08:42 AM
that's how we are doing it but third party asking me to send bearer token as a parameter inside the body?
If I do so, does it have any negative consequences? is it okay to send it?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-31-2025 02:13 PM
Hello @KM SN
Please confirm if you checked my answer. Kindly mark my answer as helpful and accept solution if it helped you in anyway. This will help me be recognized for my efforts and also it can move from unsolved bucket to solved bucket.
Regards,
Shivalika
My LinkedIn - https://www.linkedin.com/in/shivalika-gupta-540346194
My youtube - https://youtube.com/playlist?list=PLsHuNzTdkE5Cn4PyS7HdV0Vg8JsfdgQlA&si=0WynLcOwNeE