Token Generation

rna
Kilo Explorer

I am trying to generate the access token for an application which I have deployed over serviceNow,

Referred the link: http://wiki.servicenow.com/index.php?title=REST_API

Rest API : https://<InstanceName>.service-now.com/oauth_token.do

Request Body:

{"grant_type":"password","client_id":"33eb1705c75f3154400b1237989343b5","client_secret":4gE[IT#5qk,

"username":"UserName",

"password":"Password"}

Response:

        Status Code: 401 Unauthorized

        {

            "error": "server_error",

            "error_description": "access_denied"

        }

Am I missing anything?

20 REPLIES 20

Just wanted to let you know that I found out the solution to the issue that I was having. The resolution was that the {UserName} account I was using needed to have the "rest_service" role.