Getting "User Not Authenticated" message when trying to fetch incidents from postman

Aadil
Kilo Contributor

I have used the below URL to fetch the incidents from an incident table using basic authentication (used ServiceNow username and password), when hit the send from postman, unfortunately getting 401 unauthorized response

GET URL: https://devxxxxxx.service-now.com/api/now/table/incident?sysparm_limit=1

find_real_file.png

can you please guide me to resolve this authentication issue, I tried but could not exact information for the same.

1 ACCEPTED SOLUTION

You need to use the User ID on the profile

View solution in original post

13 REPLIES 13

You could pass a sysparm_query to restrict records with the encoded query

Aadil
Kilo Contributor

Is there any way to provide other authorization apart from "Basic auth", I mean how can I achieve the same using Bearer token or auth2?

find_real_file.png

@Aadil 

you can use OAuth 2.0 for inbound

Check my blog on how to setup in instance and test via Postman

If that helps please mark it helpful and also bookmark it

OAuth 2.0 with Inbound REST

Regards
Ankur

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

I already configured the same by following the ServiceNow article - https://docs.servicenow.com/bundle/rome-platform-administration/page/administer/security/task/t_CreateEndpointforExternalClients.html

 

And I looked into your article, that's a great and detailed guide for setting up OAuth2.0 authorization. appreciate your effort, will be recommended for one point solution guide.