How to integrate api with thunkable

Hello,
I would to know how I would do a POST API REQUEST using the Web component.

Below is the API request:

APIs are different, so if there is a way you could make me the blocks. i would highly appreciate.
In the above picture, I would like the Amount and phone number to be a text string.

Hope to get help soon

Hi @collinskathuli

if you are still using Thunkable Classic you might want to switch to X because of July 2020 you won’t be able to edit your projects anymore:

Best, Chris

Hello Chris,

Does it mean you need to rebuild your apps?

Yes it does- but better now then later when you cannot edit your projects anymore :wink:

Hi, @collinskathuli! :wave:

This is how you would make a POST request through Web API in Thunkable X (x.thunkable.com) -

  • Set your Headers (add all 3 of them)

    image

  • Set your API URL (copy & paste this - image)

    image

  • Set your API Body (copy and paste the full body, including the ’ { ’ & ’ } ’ )

    image
    :arrow_down:

    image


Then in the blocks area,

image


Hope I helped you! :blush:
Good Luck! :+1:

Thanks! :blush:

1 Like

Thank you @kartik14.

But in the body I would like the Amount and Phone Number to be a text string. How possible is that?

Hi, @collinskathuli! :wave:

The image block is the key.

Set the body like this -

image

Thanks! :blush:

1 Like