Servicenow Oauth token API giving 401 access denied
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-04-2022 10:43 PM
I use this API <instance_name>.service-now.com/oauth_token.do with grant_type as refresh_token.
This API is used in order to refresh the access_token every time it expires.
I was of the opinion that if this API results in 401 Unauthorized access with body as
{
"error_description": "access_denied",
"error": "server_error"
}
that means that the refresh token has expired and user has to use this API with grant_type as password.
But recently I have found out that on making multiple calls to refresh the token some fail with this error, and next time the same call passes.
Can someone help me identify what could be the issue here? or in what case can I get 401 unauthorised and on next call I get 200 as response?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-05-2022 12:49 AM
Hi @Shrinil ,
Can you check below thread
Regards,
Gunjan Kiratkar
Please Mark My Response as Correct/Helpful based on Impact
Regards,
Gunjan Kiratkar
2X ServiceNow MVP
Community Rising Star 2022
Youtube : ServiceNow Guy
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-12-2023 05:11 AM
@Shrinil did you get solution for the problem
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-12-2023 05:22 AM
Its authentication issue, check id and password you are providing
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-22-2024 10:38 AM
I'm receiving this error although I can access the instance using the same credentials with https://{instance-id}.service-now.com/login.do