Getting 401 unauthorized on Token generation URL
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-24-2023 04:26 AM - edited 07-24-2023 04:38 AM
I am trying to connect to ServiceNow using API with OAuth. For this when I have created a new Application Registry as below
But on using the above I am getting 401 unauthorized. Please let me know what I am doing wrong. PFB
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-25-2023 12:09 AM
Hi @Priya12007,
I hope your following below article for oauth 2.0 connection
https://www.servicenow.com/community/developer-blog/oauth-2-0-with-inbound-rest/ba-p/2278926
In addition to that add header
Accept : application/json
Content-Type : application/json
If my response helps you to resolve the issue close the question by Accepting solution and hit thumb icon. From Correct answers others will get benefited in future.