While Testing GET api url from post man, with No Auth, Still getting error

shashanksha
Tera Contributor

While Testing GET api url from post man, with No Auth, Still getting error .

error": {
        "message": "User Not Authenticated",
        "detail": "Required to provide Auth information"
    },
    "status": "failure"
 
shashanksha_1-1742292032331.png

 


 

10 REPLIES 10

Shivalika
Mega Sage

Hello @shashanksha 

 

It's because your instance cannot be accessed from outside without authentication by default. That would be extremely crude with no security to speak of. 

 

You need to choose Basic Auth , use your own instance  username and password and make sure you have access to the content you are trying to access. For the password you can set your own password in the user table. 

 

Please refer below link I have given complete implementation using basic auth and Oauth setup. 

 

https://youtu.be/qhbh9a_E8us 

 

Kindly mark my answer as helpful and accept solution if it helped you in anyway,

 

Regards,

Shivalika 

 

My LinkedIn - https://www.linkedin.com/in/shivalika-gupta-540346194

 

My youtube - https://youtube.com/playlist?list=PLsHuNzTdkE5Cn4PyS7HdV0Vg8JsfdgQlA&si=0WynLcOwN

eEISQCY

 

Ankur Bawiskar
Tera Patron
Tera Patron

@shashanksha 

That's OOB behavior.

You will require authentication either Basic or OAuth to interact with ServiceNow instance.

Also remember if you are using Basic Auth then that user should have all table level ACLs to GET, PUT or POST etc

If my response helped please mark it correct and close the thread so that it benefits future readers.

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

shashanksha
Tera Contributor

Hello @Ankur Bawiskar ,

 

need to integrate third party tool with servicenow using API key. How can we use it.

 

Thanks,

Shashank Sharma

@shashanksha 

3rd party will consume ServiceNow endpoint?

if yes then you can use either Basic Auth or OAuth 2.0 (more secured) and share the details with them

How to configure OAuth 2.0 in ServiceNow and share details is explained in my blow below

OAuth 2.0 with Inbound REST 

If my response helped please mark it correct and close the thread so that it benefits future readers.

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