Search code examples
jsonpostmanhttprequestazure-logic-appsx-www-form-urlencoded

how to send a Request's parameter using HTTP tool in Logic app


I'm trying to send a request using HTTP tool as you can see

enter image description here

but i get this error:

{ "error": "invalid_request", "error_description": "AADSTS900144: The request body must contain the following parameter: 'grant_type'.\r\nTrace ID: -e540--94fd-\r\nCorrelation ID: -0b33--8557-\r\nTimestamp: 2022-08-18 11:25:43Z", "error_codes": [ 900144 ],

although i can achieve this using Postman but i don't know if i'm using it the right way. and because it's in x-www-form-urlencoded format i can't just paste it in Body, i guess it has to be in Json format to be used in Body.

enter image description here

how can should use this values in HTTP tool of Logic App?


Solution

  • i found the answer here. you just need to add in the header section:

    Content-Type: application/x-www-form-urlencoded
    

    and in the body your x-www-form-urlencoded foramated string.