Getting "access_denied" error when try to get access token using rest api messege

ramesh_r
Mega Sage

Hi Friends,

I am trying to get access token using rest api, its working fine in the PostMan but when i use this code in REST Messege I am getting access dined error

Please tell me what i made issue.. since its working fine in PostMan but not working in REST Messege

Request API

find_real_file.png

Response API :

find_real_file.png

 

Working Fine in PostMan

find_real_file.png

 

 

3 REPLIES 3

Ashish Nahar
Kilo Guru

First thing is, in postman your method is POST and in servicenow you are using GET.

 

Create a new method of POST and pass all the values as body (content field) not as query parameters. Use authentication tab in your method to add authentication profile and rest everything on the query you have used should go to the content field.

 

try it and let me know

 

find_real_file.png

HI Ashish

I hope i modified as per your input but still i am getting same error, please let me know where i am mistaking 

 

 

find_real_file.png

find_real_file.png

AK46
Kilo Contributor

I'm facing the same issue, It works only in POSTMAN. Any solution?