Power Automate Desktop x-www-form-urlencoded

107 Views Asked by At

I'm attempting to send an API request in Power Automate Desktop. I've tested it in Postman, and it works flawlessly. However, when I replicate the same request in Power Automate, I encounter an error message stating 'invalid request.' I suspect the issue might be related to the encoding of the body as x-www-form-urlencoded. I've tried formatting my body data as e.g.'token:Token&client_secret:secret,' but the error persists. Has anyone encountered a similar issue or knows how to properly handle x-www-form-urlencoded body data in Power Automate?

Working Postman Working in Postman

Power Automate Desktop Power Automate Desktop

1

There are 1 best solutions below

0
Jason Dean On

If it is anything like cloud Power Automate, it may be expecting a JSON payload in the body instead of simple "key=value".

In the example below, I create a JSON payload using the PARSE JSON action in Power Automate, then I add the body of that to the HTTP request BODY.

enter image description here