How to Web post API Request

You’ll have to use post block as mentioned by @gopi . It is used to send the data to API.

i have tried it but not working

It Returning Error 400

Let’s wait for someone to fix your problems. @Rogerio_Rios Please have a look at it. Thank you. :slight_smile:

May Be it only accept data in json. Because we are adding web Header Content-Type as below.

Have you read its documentation? Which type of content does it accept? :thinking:

Yes. This line meantioned on Starting of Docs.
"Each and every post method must contain the headers as below table"

in short, I logged in using web viewer to get API Token & got Successfully.
But Still, there are more parameters that are not possible to get using a web viewer.

HttpGet request = new HttpGet(...);
request.setHeader("Authorization", "Basic "+Base64.encodeBytes("login:password".getBytes()));

This is how I do in Android Studio. Will someone please turn it into blocks? I’m unable to explain it to @akshay_gadekar that how should you do it in blocks. :sweat_smile:

yes of course, as it already has been said

It would really help if you provided a screenshot of your latest relevant blocks, so we can see what you are trying to do, and where the problem may be.


1 Like

Here is What i tried



For your Information Web Header is 100% Perfect and tested with successful response.
also API Documentation Mentioned This line "Each and every post method must contain the headers as below table"

1 is wrong, you have to use PostText
2 looks better, but you do not use JSON format in the PostText block
3 use JSON format and remove the Get block

use the join block and put together your JSON format manually
{"clientcode":"CLIENT_ID", "password":"CLIENT_PASSWORD"}


1 Like

Once Again Thank you very much @Taifun
Solution Used:

1 Like

looks almost perfect…
just remove the Get block…


1 Like

Okk Done…


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