The CreatorCon Call for Content is officially open! Get started here.

Getting Http Status 0 when triggering REST Message to Get OAuth Access Token

Mrman
Tera Guru

Hi ,

I create a Rest Message in ServiceNow to call a 3rd party endpoint to request access token .

I have included the client id, client secret , grant type as client credentials , and audience in the Body and tested in Postman . I am able to get the response and getting access token.

But the same configuration when I do in service now using REST message , I am getitng Http Status as 0 and Error code as 1. 

Error message as :Request not sent to uri=

Please suggest .

@Ankur Bawiskar 

 

12 REPLIES 12

Tony Chatfield1
Kilo Patron

Hi, without any details of your configuration the forum can only guess at your issue.
Perhaps you can update this thread with clear and specific information?

@Tony Chatfield I have shared the details of configuration below , Please suggest.

Ankur Bawiskar
Tera Patron
Tera Patron

Hi,

Share the configuration screenshots etc

If you are able to test via Postman then it should work fine in ServiceNow Rest Message as welll.

Regards
Ankur

Regards,
Ankur
✨ Certified Technical Architect  ||  ✨ 9x ServiceNow MVP  ||  ✨ ServiceNow Community Leader

@Ankur Bawiskar I am now getting the below error when testing the Get Token Rest Message in Service Now.

The same client id , client secret and other parameters I am usng in Postman and I am getting the token.

Please let me know what additional parameters I need to add in ServiceNow rest message.

 

Http Status : 401
 Error message : Method failed: (/oauth/token) with code: 401 - Invalid username/password combo

Response : {"error":"access_denied","error_description":"Unauthorized"}

 

Rest Message Configuration :

====================

find_real_file.png

 

find_real_file.png

 

Iin POstman I am able to get the Token successfully when I am passing these parameters in the Body .

 

Please suggest.