Issue with OAuth Toekn generation. Error : Method failed: (/oauth_token.do) with code: 401 - Invalid
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-13-2023 02:26 PM
Hi All,
Requirement is to integrate two ServiceNow instances, using OAuth 2.0 for Incident E-bonding.
As part of that i have created a record in Application Registry in Instance A and got the Client ID, Client Secret etc. Also i have created a user account and have the credentials.
Now when i try to generate the Refresh Token & Access Token using Postman, they are getting generated without any issue.
However, when i try to generate them from a Rest Message in Instance B, we are getting below error:
Error Message : Method failed: (/oauth_token.do) with code: 401 - Invalid username/password combo
Response : {"error_description":"access_denied","error":"server_error"}
I have created a Rest Message with Post method and using following details:
grant_type=password&client_id=ClientIDreceived&client_secret=ClientSecretreceived&username=username&password=pwd
Content_Type application/x-www-form-urlencoded
Tried multiple things without any luck. Any guidance on this will be appreciated.
Regards,
Kumar.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-01-2024 04:22 AM
anyone has update on this?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-01-2024 12:28 PM
Hi,
There was an issue with the user account that is being used. Deleting the user record and recreating it had done the trick.
It was a bit weird but that’s reality!!