curl command to my PDI get "User is not authenticated" response
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
yesterday
I just got a new PDI today with "Australia" release. I setup password for "admin" user account, and I can login to the "admin" account from browser successfully.
Then from a Linux VM, and also tried from macbook, I issue curl commands like these:
> curl -v -u 'admin:<pwd>' https://dev384358.service-now.com/api/now/stats/sys_user
> curl -v -u 'admin:<pwd>' https://dev384358.service-now.com/api/now/table/sys_user?sysparm_limit=1
> curl -v --user "admin:<pwd>" --header "Content-Type: application/json" --header "Accept: application/json" --request POST --data "{\"short_description\":\"incident $timestamp\",\"caller_id\":\"admin\"}" "https://dev384358.service-now.com/api/now/table/incident"
All the above got this response:
{"error":{"message":"User is not authenticated","detail":"Required to provide Auth information"},"status":"failure"}
from verbose:
* About to connect() to dev384358.service-now.com port 443 (#0)
* Trying 148.139.239.168...
* Connected to dev384358.service-now.com (148.139.239.168) port 443 (#0)
* Initializing NSS with certpath: sql:/etc/pki/nssdb
* CAfile: /etc/pki/tls/certs/ca-bundle.crt
CApath: none
* SSL connection using TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256
* Server certificate:
* subject: CN=*.service-now.com,O="ServiceNow, Inc.",L=Santa Clara,ST=California,C=US
* start date: Feb 12 00:00:00 2026 GMT
* expire date: Nov 13 23:59:59 2026 GMT
* common name: *.service-now.com
* issuer: CN=DigiCert Global G2 TLS RSA SHA256 2020 CA1,O=DigiCert Inc,C=US
* Server auth using Basic with user 'admin'
> GET /api/now/stats/sys_user HTTP/1.1
> Authorization: Basic <xxxxx>
> User-Agent: curl/7.29.0
> Host: dev384358.service-now.com
> Accept: */*
>
< HTTP/1.1 401 Unauthorized
< Server: snow_adc
< Date: Thu, 16 Jul 2026 01:36:02 GMT
< Content-Type: application/json;charset=UTF-8
< Transfer-Encoding: chunked
< Connection: keep-alive
< Set-Cookie: JSESSIONID=6AFA7C03D6EB12FA6704512D996D76F8; Path=/; HttpOnly
< Server-Timing: t;desc="065c21e64702", sem_wait;dur=0, sesh_wait;dur=0
* Authentication problem. Ignoring this.
< WWW-Authenticate: Basic realm="Service-now"
< X-Content-Type-Options: nosniff
< Pragma: no-store,no-cache
< Cache-Control: no-cache,no-store,must-revalidate,max-age=-1
< Expires: 0
< Strict-Transport-Security: max-age=63072000; includeSubDomains
<
* Connection #0 to host dev384358.service-now.com left intact
{"error":{"message":"User is not authenticated","detail":"Required to provide Auth information"},"status":"failure"}
I need the PDI for integrating with our web app, so using REST API to access the PDI is needed. Please help to get the curl command working. Thanks!