Join the #BuildWithBuildAgent Challenge! Get recognized, earn exclusive swag, and inspire the ServiceNow Community with what you can build using Build Agent.  Join the Challenge.

base64 encoding credentials

Tomer
Kilo Expert

Hello experts,

I'm having the same issue as:

https://community.servicenow.com/community?id=community_question&sys_id=29658baddbd8dbc01dcaf3231f96...

but I didn't understand where I need to use this code in order to create an Authorization header: 

var username = "my_username";

var password = "my_password";

encodedAuth = GlideStringUtil.base64Encode(username + ':' + password);

gs.print("BASIC " +encodedAuth);

can someone please guide me?

Thanks,

Tomer.

2 REPLIES 2

manish64
Giga Guru

in outbound rest , you can set up basic auth profile with username and password where u can key in you no need to encode then 

find_real_file.png

 

thanks, but I did this from the beginning, and still see 401 error...