Send Body with request header in method

Can anyone help me to convert the below curl code to blocks.

curl -X POST -d ‘grant_type=account_credentials’ -d ‘account_id=5yiPLwmTTpQVBnMxOlf32q’ -H ‘Host:’ -H ‘Authorization: Basic aGwbwxOgK6eGHEO0W1DOCv5WCODeVxoet7DFEON7bR23gP5qEW7cmeWCbCEO3ApBEWlRwCVpDWB==’

I use curl to blocks method

but here missing body and ,it does not work properly.

1 Like

Use your correctly base64 encoded client secret
And don’t forget to use the Post method together with your data
Then use the Web.GotText event to see, which response content you get


I don’t understand

Do you mene this

What about trying it?


I try it on postman where it work properly
but kodular show

try it on label

where i send body in kodular in post merthod

Please help me. I do not understood.

The blocks look good…
You can try to add another key value pair into your header


Also what about providing a link to the API documentation?


am I blocks are right ?

I following these steps…

  1. Encode the client ID and client secret in base64 format (with a colon between them, e.g. client_id:client_secret).
  2. Set up your API request header and include your encoded client ID and client secret using the ‘Basic’ HTTP Authentication Scheme (replace HHHHH0000011111 with your encoded credentials).
    "Content-Type": "application/x-www-form-urlencoded",
    "Authorization": "Basic HHHHH0000011111"
  1. Set up the body of the access token request using the account_credentials grant_type and your account_id (replace 1234 with your account ID).
    "grant_type": "account_credentials",
    "account_id": 1234
  1. Send the header and body as a POST request to the token API at to get an access token.

  2. The successful response will be the access token.