Configure Rest Message endpoint in ServiceNow

SM16
Tera Expert

Hi Team,

 

How do you configure this kind of Rest message in ServiceNow. See the body is in x-www-form-urlencoded

 

SM16_0-1680866687279.png

 

1 ACCEPTED SOLUTION
10 REPLIES 10

Did you try setting the content-type in the header?

Also, I think you can probably use "application/json" instead of "application/x-www-form-urlencoded"

 

Please send screenshots of what you tried in ServiceNow (not postman)

 

 

 

I tried but it's failing. Here are the actual endpoint and keys

 

https://outscan.outpost24.com/opi/rest/auth/login

 

username : your_username

password : your_password

 

When you try sending these, the response should be Incorrect login as shown in the screenshot below

 

SM16_0-1680874378877.png

 

 

Ah, I see. Thanks. I will try this. Great help.

 

And what if I want to pass dynamic values for username and password?

You can use variables, then click "auto-generate variables". 
Then when you preview the script, in the code, you can dynamically plug in the variables.

Mike_R_0-1680875583319.png

 

Mike_R_1-1680875607866.png