Where to get my basic authorization code for REST API call

jackh
Kilo Contributor

Hi,

I'm new to the ServiceNow API.   According to the "Integrate using the REST API" documentation page, we need to use BasicAuth in header when calling the REST API.   Where can I get such basic auth code for my developer instance use?

Thanks

1 ACCEPTED SOLUTION

Vikas-Malhotra
Mega Guru

Hi Jack,



1. Go to "Rest API Explorer" from the left navigation.


2. Select the method you want to use. Fill all the necessary details for your web service i.e. table name and response type etc.


3. Click Send.


4. Click any of the link you want from these: Servicenow, python, ruby and javascript etc.


5. You will see the header for your relevant task.



Hope its helpful.



Thanks and Regards,


Vikas Malhotra


View solution in original post

4 REPLIES 4

Vikas-Malhotra
Mega Guru

Hi Jack,



1. Go to "Rest API Explorer" from the left navigation.


2. Select the method you want to use. Fill all the necessary details for your web service i.e. table name and response type etc.


3. Click Send.


4. Click any of the link you want from these: Servicenow, python, ruby and javascript etc.


5. You will see the header for your relevant task.



Hope its helpful.



Thanks and Regards,


Vikas Malhotra


Clicking the link of scripting language does tell me how to pass the credential on API call.   Thanks


Hi Jack,



Glad to know it worked for you.



You may mark my response helpful or correct so as to help others also who may have the same issue.



Thanks and Regards,


Vikas Malhotra


tony_barratt
ServiceNow Employee
ServiceNow Employee

Hi Jack,



You can choose between "Send as me"


Screen Shot 2016-04-19 at 8.36.36 AM.JPG




or a user of your choice


Screen Shot 2016-04-19 at 8.37.01 AM.JPG



Best Regards



Tony