HTTP Client - Passing Header not working

Hi,

I’m invoking the Get-Password API endpoint as documented here -

The Curl looks like this and I have verified this is working using POSTMAN for our instance of CyberArk.

curl --location --request POST ‘https://components.cyberarkdemo.com/PasswordVault/api/Accounts/27_10/Password/Retrieve
–header ‘Authorization: ZWI5NDUxOGMtNDhmMS00YWUwLTk5OGEtZThiZjM4MDQ4MTk5OzVDMTQ1NUQzREQyQUFBRjM7MDAwMDAwMDJGM0Q2QkRCRUVCMjQ3OTdEQzM5NDgzNzk1MTkzNDAwMTMwQjI4OThDQUJFQkQxMDBDN0NDMDNFQTBCQ0QxQzg2MDAwMDAwMDA7’
–data-raw ‘{
“ActionType”: “show”
}’

The token is obtained by a previous Logon Call and that call is working for me. So I suspect it is passing of the authorization token, that’s not working.

Here is my Postman details

here is my Uipath Test

I need some kind soul to help me with this ASAP. Before I’m asked - Yes, have raised support case but waiting time is killing me and hoping for a faster response from real users.

Kind regards,
B

@bghosh

As you are doing POST method, then is there any Body provided to post?

I don’t see any Body from the screenshots you provide and could be the reason

Also check if you need a GET method, then change to GET?

Hope this helps you

Follow Link

The body is optional per my testing using POSTMAN. The response is same in UiPath with / without the body - it complains that the token as either expired / invalid / missing. As you may see in POSTMAN it is a POST method only as per the documentation.

The body I tried was per the following screen -

The message I get is

image

Thanks,
B

@bghosh

You can try as instead of passing through a variable, you can hard code the Authorization value

I know it won’t make much difference, but you can check

Also are you referring to the below documentation to get password value?

Then try to pass the required body as per the above documentation and try

Hope this helps you

Thanks

It didn’t work by getting token in one call and passing hard coded value, I’m not sure what was the issue there.

However, I have got this resolved now. It seems that the token is received with quotes, which were not part of the token itself. So passing that whole was breaking the call. I stripped the quotes and it worked like a treat.

Thanks again for your kind inputs.

B

1 Like