# HTML POST Help Please

**URL:** https://community.thunkable.com/t/html-post-help-please/44009
**Category:** Questions about Thunkable X
**Created:** [August 30, 2018, 3:20am UTC](https://community.thunkable.com/t/html-post-help-please/44009 "2018-08-30T03:20:28Z")
**Posts on this page:** 7
**Page:** 1

<div class="post-metadata">

### Author: ![David\_White](https://avatars.discourse-cdn.com/v4/letter/d/8491ac/32.png) [@David\_White](https://community.thunkable.com/u/David_White)
#### Post date: [August 30, 2018, 3:20am UTC](https://community.thunkable.com/t/html-post-help-please/44009/1 "2018-08-30T03:20:28Z")

</div>

_[This was edited by @mark to resurrect the formatting and image]_

Hello

I would like some help creating a HTML POST to the twilio api.

Sample code twilio have provided is. (they also provide alternative formats)

```auto
 <?php
// Get the PHP helper library from twilio.com/docs/php/install
require_once '/path/to/vendor/autoload.php'; // Loads the library
use Twilio\Rest\Client;

$sid = '<AccountSid>';
$token = '<AuthToken>';
$client = new Client($sid, $token);

$client->messages->create(
  '<customer_phone_number>',
  array(
    'from' => '<your_twilio_number>',
    'body' => 'text content',
  )
);

```

I have attempted to create a HTTP request using the POST method in this format

```auto
POST https://api.twilio.com/2010-04-01/Accounts/ [My Account Number]/Messages
Authorization: Basic [My Auth token]
Host: api.twilio.com
Content-Type: application/x-www-form-urlencoded
Content-Length: 50

To=555555555&From=555555556&Body=text content

```

The image shows how I’ve tried to do this. I don’t have experience in this area so everything I’ve done is via google, therefore I’m potentially way off.

I think this is probably a simple thing to do but as I’m inexperienced I’m struggling.

Thanks

 ![posthelp](https://us1.discourse-cdn.com/flex015/uploads/thunkable/original/3X/f/8/f87f246542ccb84c899c472a739da20949718ac2.jpg)

---

<div class="post-metadata">

### Author: ![cttricks](https://sea1.discourse-cdn.com/flex015/user_avatar/community.thunkable.com/cttricks/32/93678_2.png) [@cttricks](https://community.thunkable.com/u/cttricks)
#### Post date: [August 30, 2018, 8:43am UTC](https://community.thunkable.com/t/html-post-help-please/44009/2 "2018-08-30T08:43:14Z")

</div>

What you want to do ?? Can you clarify it ??

---

<div class="post-metadata">

### Author: ![David\_White](https://avatars.discourse-cdn.com/v4/letter/d/8491ac/32.png) [@David\_White](https://community.thunkable.com/u/David_White)
#### Post date: [August 31, 2018, 3:30am UTC](https://community.thunkable.com/t/html-post-help-please/44009/3 "2018-08-31T03:30:28Z")

</div>

I want to send a post method to the api with URL above, presumably using the webapi component.

The Post method results in a text message being sent by the api to a specified number and from a specified number with the body of the post being the message.

The thunkable webapi has fields for URL, Body and Headers which is fine. I’m putting the authorization in as a header and that is working. However I’m not sure where to put the From=+xxxxxxxx and To=+xxxxxxxxxx in the webapi component.

Thanks

---

<div class="post-metadata">

### Author: ![cttricks](https://sea1.discourse-cdn.com/flex015/user_avatar/community.thunkable.com/cttricks/32/93678_2.png) [@cttricks](https://community.thunkable.com/u/cttricks)
#### Post date: [August 31, 2018, 4:33am UTC](https://community.thunkable.com/t/html-post-help-please/44009/4 "2018-08-31T04:33:47Z")

</div>

Sorry !! but i havent’t used twilio yet. are you creating a otp verification system ??

---

<div class="post-metadata">

### Author: ![David\_White](https://avatars.discourse-cdn.com/v4/letter/d/8491ac/32.png) [@David\_White](https://community.thunkable.com/u/David_White)
#### Post date: [September 1, 2018, 2:39am UTC](https://community.thunkable.com/t/html-post-help-please/44009/5 "2018-09-01T02:39:52Z")

</div>

It looks like I could do it in Thunkable Classic using the Web component which allows input of post text, however the Webapi in Thunkable X doesn’t have this functionality.

EDIT: Got it to work. set the BODY field to “From=%2BPhonenumber&To=%2BPhonenumber&Body=message”

---

<div class="post-metadata">

### Author: ![dhm.thacker1](https://avatars.discourse-cdn.com/v4/letter/d/8c91f0/32.png) [@dhm.thacker1](https://community.thunkable.com/u/dhm.thacker1)
#### Post date: [June 19, 2020, 6:51am UTC](https://community.thunkable.com/t/html-post-help-please/44009/6 "2020-06-19T06:51:05Z")

</div>

Hey, i used the exact same method… i am getting error 401…can you please guide

---

<div class="post-metadata">

### Author: ![ioannis](https://sea1.discourse-cdn.com/flex015/user_avatar/community.thunkable.com/ioannis/32/146956_2.png) [@ioannis](https://community.thunkable.com/u/ioannis)
#### Post date: [November 8, 2024, 11:25am UTC](https://community.thunkable.com/t/html-post-help-please/44009/7 "2024-11-08T11:25:35Z")

</div>


