REST message is working but not through Flow Designer (401 - Forbidden username/password combo)

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-10-2022 02:24 AM
I am trying to set up a POST REST message to create outage articles on the client’s intranet. When I am testing through a REST message record (sys_rest_message table) the test goes fine: HTTP status 200, no error messages and an article is created on the intranet:
However, when I try to achieve the same thing through a REST action step in Flow Designer, I get the following error message:
Method failed: (/api/pageintegration/add) with code: 401 - Forbidden username/password combo
The authentication is set in the HTTP headers, but it looks like it is searching for credentials when done through an Action Step.
Any advice on what I am missing here, or how to troubleshoot further?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-10-2022 02:52 AM
Hi,
how are you including the credentials in the Flow?
The reason it's working when you test it using Rest Message is because you possibly added the authentication headers there.
Did you try testing it via Postman?
Something similar can be added in flow step. you need to compare both
Ankur
✨ Certified Technical Architect || ✨ 9x ServiceNow MVP || ✨ ServiceNow Community Leader

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-10-2022 03:06 AM
The credentials are added as Headers in the flow action step in the "Request Details":
I tested in Postman and it works:
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-15-2022 11:51 AM
Hi,
Did you work out what the issue was on here ? I've done the same thing adding 2 headers client_id & client_secret and even though the step logs show it is going to add those, it's not received on my target platform. I'm sure in older versions I've done this without an issue.
Thanks