Hiding password from REST API script

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
ā07-03-2019 08:07 PM
I am using javascript to insert an entry in ServiceNow table using REST API (System Web Service ) Method.
Is there any option that I can hide password from script?, I am good to use any other script language also.
My goal is to insert an entry in an ServiceNow table from outside ServiceNow like a windows server or UI page.
client.setRequestHeader('Authorization', 'Basic '+btoa('admin'+':'+'admin'));
- Labels:
-
Scripting and Coding
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
ā07-03-2019 08:59 PM
Hi,
may be you can try to get it from system property by storing it as password type in system property
create system property of type password and store that and use that in your script.
Mark Correct if this solves your issue and also mark Helpful if you find my response worthy based on the impact.
Thanks
Ankur
Ankur
⨠Certified Technical Architect || ⨠9x ServiceNow MVP || ⨠ServiceNow Community Leader

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
ā07-03-2019 09:13 PM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
ā07-09-2019 11:06 PM
Hi,
Any update on this?
Can you mark my answer as correct, helpful if you were able to achieve the requirement. This helps in removing this question from unanswered list and helps users to learn from your thread. Thanks in advance.
Regards
Ankur
Ankur
⨠Certified Technical Architect || ⨠9x ServiceNow MVP || ⨠ServiceNow Community Leader