- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-14-2023 09:00 AM
Hi all,
I have setup an Application Registry record in ServiceNow along with Connection and Credential Alias.
But for this specific integration it is required the client id and client secret are base64 encoded, so how can I do this please? Can this be done via the Oauth API script field option in the app registry record?
When I test with Postman I use the base64 encoded client id secret in the Authorisation header,
Thanks in advance.
Solved! Go to Solution.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-14-2023 09:10 AM

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-15-2023 02:23 AM
I understand, but that is possible with what Jaspal suggested.
Use something like this in a script.
var base64Val = gs.base64Encode(clientId + ':' + clientSecret);
And use that in the Auth header.
How is the Rest call triggered? If it's in a script, you could do this directly, or in a flow (action), use a script step, and use this as output.
Help others to find a correct solution by marking the appropriate response as accepted solution and helpful.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-15-2023 02:32 AM
Thanks @Peter Bodelier Im not sure I understood Jaspals Suggestion. Could you explain please? Where do I use the above script and where can I define the auth header in ServiceNow?

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-15-2023 02:33 AM
Hi @Popat420,
That depends, how are you triggering your REST call?
Help others to find a correct solution by marking the appropriate response as accepted solution and helpful.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-15-2023 02:20 AM
I am inline with @Jaspal Singh solution.
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]
****************************************************************************************************************
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-15-2023 02:26 AM
Hi @Dr Atul G- LNG can you please explain to me what solution Jaspal has provided because I think I am not understanding clearly. The forum he has linked talks about using credentials username and password instead of base64 encoded ?