Token Generation
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎04-07-2015 03:13 AM
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?
- Labels:
-
Integrations
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎07-06-2015 04:55 AM
Hi,
Are you able to crack it, I am also facing the same issue with generating token using demo instances, getting the below response
Status Code: 401 Unauthorized
{
"error": "server_error",
"error_description": "access_denied"
}
Thanks and regards,
Venki
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎07-06-2015 07:11 AM
Venki,
I would double-check that the client_id and client_secret you're using are correct. Go to "Application Registry" module under System OAuth and create a client if needed, then use those credentials in your request.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎07-07-2015 03:01 AM
Hi Smith,
I checked that again and yes it is correct..does the demoxxx instances allows us to generate tokens or do we need to have our own instances. Because i tried with different instances demo002,demo005 and in all it is the same result "401 Unauthorized".
has anyone succeeded in generating tokens through the rest api call using the demo instances.
Thanks and regards,
venki
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎01-08-2016 08:40 AM
I am having the same issue so has anyone found a solution to this issue? My plans are to create an incident in ServiceNow from a SharePoint 2013 workflow and I use the "Advanced Rest Client" app in Chrome to help me test my REST calls. I have followed the wiki procedures for setting up OAuth, OAuth with REST, and the OAuth plugin is active. The funny thing is even if I do not include the request body then I still get the same access denied error but I would expect a different error since the body is missing. Is there something else that has to enabled in ServiceNow? Thanks.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎01-08-2016 08:50 AM
Billy, can you post a sanitized version of the HTTP request you're making? It's hard to help otherwise.