Oauth Token results with access denied with code 401

madidi1349
Tera Contributor

Hi all. I'm trying to retrieve oauth token using grant_type - password. But all I'm getting is error.

I have looked into various community question but did not get any fruitful response in my case.

I have created application and used my admin creds.

1 REPLY 1

AndersBGS
Tera Patron
Tera Patron

Hi @madidi1349 ,

 

the 401 unauthorized HTTP response points towards something is either wrong with the information you're sending or the roles in ServiceNow. I would suggest to verify all header information and maybe also created a dedicated user with rest_api_explorer, Web_service_admin and some CRUD for the table that you would like to work with. 

 

If my answer has helped with your question, please mark my answer as accepted solution and give a thumb up.

 

best regards

Anders

If my answer has helped with your question, please mark my answer as the accepted solution and give a thumbs up.

Best regards
Anders

Rising star 2024
MVP 2025
linkedIn: https://www.linkedin.com/in/andersskovbjerg/