HTTP Request- POST Activity error

Hello,

I am trying to POST a comment in internal system of which i already have username and api Token. My request looks like this:

My ApiToken is - Bearer xyz

Get method works and so does POST in postman.
I get an error in UiPath - “Method ‘POST’ is not allowed for authentication redirect.”

How do I resolve this?

Please check below
Incorrect API Endpoint – You might be sending the request to the wrong URL.

Redirect Behavior – Some APIs redirect authentication requests, but they only allow GET for redirections, not POST

If you’re using OAuth2, the authentication response might be redirecting you improperly.

Regards,
Arivu

@parnalmahavir.patni

For that API you must dont have access to do the operations for post activity.

Instead trying with activity, try from postman if it worked then try with UiPath activity

Happy Automation!!

As you can see it in the screenshot - My Authentication is selected as ‘None’.

It worked with Postman. I have the rights to write and read both for the dedicated URL Page.

Hi @parnalmahavir.patni

I think you’ll need to find out more information.

Some hints could be explored by:

  • Using https://webhook.site website to send the same request from both Postman and Studio.
    Do not send sensitive information, use dummy data for actual credentials.
    This method will allow you to see if your request look 100% the same when leaving your machine, be it Postman or Studio. If not, then there will be hints on what to fix in Studio.

  • Going to Postman and disabling automatic redirect in the settings and looking at the output; it would be interesting to learn if there is a redirect involved in the entire request

in postman what exactly you are passing to authentication check is there any differences for logins, and check any firewalls are restricting the UiPath calls.

instead of using variables try with direct values.

I was passing apiToken in String and adding it as a Variable in Authorization.
I just changed the authorization to this:


It works now.

1 Like

Great try. @parnalmahavir.patni

Please mark post as solution to close the topic

This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.