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

Hi,

error 401 means incorrect username and password

Did you give correct credentials for Authentication profile?

Regards
Ankur

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

Hi Ankur,

I have not given Authentication profile , I included the client id , client secret in the Rest message content . 

Will this be an issue ?

Hi,

how are you testing with postman?

regards
Ankur

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

Hi Ankur,

Below is the screenshot in postman , I am able to get Access token.

Please suggest.

find_real_file.png

@Ankur Bawiskar I have created OAuth profile and used the in the Authetication table of Rest message . I have kept the client id , client secret , audience and grant type in the content as is. 

Now I started getting different error message . Please suggest .

 

find_real_file.png