REST API not able to authorize login

dshallcross
Kilo Explorer

We are looking to extract data via the REST API. When attempting to do we are presented with a 401 error in postman and also other methods of calling the endpoint.  We are definitely using the correct username and password via basic auth. Co-pilot suggests it could be a permissions setup as we are using SSO for other accounts in the business. Could this be possible? How do I stop SSO interfering with the service account calling the API endpoint. This is unlike the other like this in the community forum, we don't wish to extract data from dev.

This is the endpoint being attempted api/now/table/sys_user?sysparm_limit=1

Example error

dshallcross_0-1778161704561.png

 

7 REPLIES 7

Tanushree Maiti
Kilo Patron

Hi @dshallcross 

 

The 401 Unauthorized error in REST API means your request is missing valid/correct authentication credentials.

 

Use correct credential (user id/password), your issue will be fixed.

 

Please mark this response as Helpful & Accept it as solution if it assisted you with your question.
Regards
Tanushree Maiti
ServiceNow Technical Architect
Linkedin:

Hi I am using the correct credentials, seems to be another issue

Ankur Bawiskar
Tera Patron

@dshallcross 

are you sure you are using valid credentials?

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

100% I am using valid credentials as when I login to ServiceNow using these same credentials I have no issues.