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

Ricky S Larsson
Tera Guru

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:

 

rest1.png

rest2.png

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

 

rest3.pngrest4.pngrest5.png

 

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?

 

3 REPLIES 3

Ankur Bawiskar
Tera Patron
Tera Patron

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

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

The credentials are added as Headers in the flow action step in the "Request Details":

rest3-1.png

I tested in Postman and it works:

postman.png

Steve84
Tera Contributor

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