switch autenthication method from basic to bearer token
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-23-2023 03:45 AM - edited 11-23-2023 03:51 AM
hello all,
has anyone here experience with switching the authentication method from basic to bearer token?
the bearer token is already generated but i have no experience and i dont know where to start.
I will be thankful for any guidance
edited to add: somebody told me that i have to use a script but i dont know how and where. (i can provide the script if needed)
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-05-2023 10:34 PM
Hello @lmao
Yes you have to create OAuth Profile.
Mark ✅ Correct if this solves your issue and also mark 👍 Helpful if you find my response worthy based on the impact.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-06-2023 03:52 AM
thank you, i have checked this and apparently i will have to create a lot of entries in total. I have nobody to guide me through this process, do you have any documentation regarding this? i couldnt find it on the product documentation.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-23-2023 04:12 AM
HI @lmao ,
I trust you are doing great.
Switching from basic authentication to bearer token authentication in ServiceNow is a significant change but it can be smoothly done with the right guidance.
You have to just ad the below lines of code to the preview script from the rest message.
var headers = new Headers();
headers.append("Authorization", "Bearer " + your_bearer_token);
// Add other necessary headers and request details
Was this answer helpful?
Please consider marking it correct or helpful.
Your feedback helps us improve!
Thank you!
Regards,
Amit Gujrathi
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-27-2023 01:32 AM
thank you, i will discuss both solutions within my team and then will mark the right answer as correct.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-05-2023 05:38 AM
hello Amit,
can you please show me where i can add this script? i cant find any script in my REST message