Credentials for Basic authetication to test the REST API

mstancheva
Tera Contributor

Used credentials to test the API are admin:admin. But I often receive Not Authorized Exception.

Are there other credentials that can be used?

Best regards,

Mihaela Stancheva

6 REPLIES 6

reI need to have access to the GRUD Operations to the TABLE API. I read from the documentation that I have to create a user with role "rest_service". How can I do it with basic authentication and user admin:admin on the demo environment on the ServiceNow Wiki. Has anyone tried it? Thank you


Best regards,


Mihaela


kurtcharney
Kilo Contributor

Also another thing to take into account is that the formatting of the Basic auth in the header might be incorrect.


Some applications expect



Basic   username:password



That is not necessarily the format that is passed via ServiceNow.


To accommodate I have had to manually add that header as a parameter - unfortunately the password for that is not decrypted by the MID server.


So I need to decrypt it in before passing it to the workflow REST event.



I still need to test this in Istanbul but this was true for Helsinki.


Check your ECC logs and see what is the full error message being returned to you. That might provide a deeper context.



Kurt