REST API Required to provide Auth information
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
ā08-30-2020 07:40 PM
Hi,
I'm new to servicenow and I'm trying to fetch a ticket's details using the REST api. I took a look at the docs particularly this
https://developer.servicenow.com/dev.do#!/reference/api/orlando/rest/c_TableAPI#r_TableAPI-GETid
I tried to call the api using curl
curl "https://<our-instance>.service-now.com/api/now/table/change_request/166dea65db965050c055927adb9619f6" \
--request GET \
--header "Accept:application/json" \
--user 'username':'password'
But it returned an error
{"error":{"message":"User Not Authenticated","detail":"Required to provide Auth information"},"status":"failure"}
Can anyone help me with this or point me in the right direction on how to properly use servicenow REST APIs? Like is there a permission I need to set to my account or do I need to generate a token instead of using password?
- Labels:
-
Integrations
-
Scripting and Coding

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
ā08-31-2020 11:27 AM
Kent,
- Start off by confirming the username and password you have exactly matches the one on the user record.
- Check if the user is active and not locked out (Could be locked out if you attempted too many incorrectly)
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
ā08-31-2020 11:22 PM
Hi Richard,
Thank you for your reply.
1. Username and password is the one i used in the UI. Able to see the table and the ticket I wanted to see in UI.
2. It's not locked out in the UI so it shouldn't be locked out when being used in api calls right?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
ā09-01-2020 12:08 AM
Hi Kent,
few things to check
1) since you are using OOB Table API please check these
a) the user being used for authentication has READ Access to the Table change_request
b) Check any query business rule is restricting the record visibility
c) Check the user is active and not locked out
Please check with admin credentials if this works
Regards
Ankur
Ankur
⨠Certified Technical Architect || ⨠9x ServiceNow MVP || ⨠ServiceNow Community Leader
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
ā07-21-2023 07:25 AM
Hi Ankur,
How can we check whether our account is locked out or not?