- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-07-2023 04:24 AM
Hi Team,
How do you configure this kind of Rest message in ServiceNow. See the body is in x-www-form-urlencoded
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-07-2023 06:43 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-07-2023 06:24 AM - edited 04-07-2023 06:44 AM
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)
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-07-2023 06:33 AM
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
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-07-2023 06:43 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-07-2023 06:47 AM
Ah, I see. Thanks. I will try this. Great help.
And what if I want to pass dynamic values for username and password?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-07-2023 06:53 AM
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.