Unauthorized to send REST API requests on incident table

sovanna
Mega Contributor

Hi,

I'm trying to test the REST API in order to send requests on the incident table.

Each day I create a test user with the "rest_service" profile on Service Now's sandbox :   ServiceNow

I was able to create incidents successfully for 2 days.

But now I get the following error in RESTClient

  1. Status Code: 401 Unauthorized
  2. Connection: close
  3. Content-Encoding: gzip
  4. Content-Type: application/json
  5. Date: Fri, 09 Jan 2015 15:54:02 GMT
  6. Server: ServiceNow
  7. Transfer-Encoding: chunked
  8. WWW-Authenticate: BASIC realm="Service-now"

Thanks,

Sovanna

1 ACCEPTED SOLUTION

Works fine on this instance!


Thanks Hari!


View solution in original post

8 REPLIES 8

Subhajit1
Giga Guru

Check if your Username and Password combination is correct or not?


Hi Subhajit,



the username that should be used is the "user id" field right ?


I did verified my password, and actually managed to connect with the "user id" field /password on the login page :


ServiceNow


Are you able to create incidents with the REST API on this instance ?



Regards,


Sovanna


Try granting him itil role also. If you are trying to create incidents, it makes sense that the user trying to create it has the appropriate permissions to do it.



Regards,


Hari


Not working either.


I'm using the REST Client from Mozilla :


Method POST


URL : https://sandbox.service-now.com/api/now/table/incident


Headers


  • Accept:application/json
  • Content-Type:application/json

Basic Auth :


  • username : sno_user
  • password : sno_user