How can I base64 encode a client ID and client secret in the Application Registry?

Popat420
Tera Expert

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,

 

Screenshot 2023-11-14 at 16.57.51 copy.png

 

Thanks in advance. 

1 ACCEPTED SOLUTION

Jaspal Singh
Mega Patron
Mega Patron

Hi,

You can try something from thread to pass the client id and secret value. Also, check link once.

 

View solution in original post

14 REPLIES 14

Ankur Bawiskar
Tera Patron
Tera Patron

@Popat420 

why to encode it? is it a customer requirement?

you usually use the OAuth profile in REST Message

Regards,
Ankur
Certified Technical Architect  ||  9x ServiceNow MVP  ||  ServiceNow Community Leader

Hi @Ankur Bawiskar, yes its customer requirement and also we can't get the token if the client id and secret are not base64 ecoded and passed through via the header. Can you help me with this please

Hi @Popat420 

 

There is no way to do this directly in the application registry. The best solution would be what @Jaspal Singh suggested.


Help others to find a correct solution by marking the appropriate response as accepted solution and helpful.

@Peter Bodelier unfrtunately I can't use credentials for this API, it has to be passed via Authorization header and be base64 encoded