Join the #BuildWithBuildAgent Challenge! Get recognized, earn exclusive swag, and inspire the ServiceNow Community with what you can build using Build Agent.  Join the Challenge.

Getting 401 unauthorized on Token generation URL

Priya12007
Giga Contributor

I am trying to connect to ServiceNow using API with OAuth. For this when I have created a new Application Registry as below

Priya12007_0-1690197828512.png

But on using the above I am getting 401 unauthorized. Please let me know what I am doing wrong. PFB 

Priya12007_1-1690197952610.png

 



5 REPLIES 5

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.