# Twilio and API Connector

**URL:** <https://forum.bubble.io/t/twilio-and-api-connector/3280>\
**Category:** Need help\
**Created:** [May 29, 2016, 6:45pm UTC](https://forum.bubble.io/t/twilio-and-api-connector/3280 "2016-05-29T18:45:21Z")\
**Posts on this page:** 20\
**Page:** 1

<div class="post-metadata">

**Author:** ![cho](https://avatars.discourse-cdn.com/v4/letter/c/f17d59/32.png) [@cho](https://forum.bubble.io/u/cho)\
**Post date:** [May 29, 2016, 6:45pm UTC](https://forum.bubble.io/t/twilio-and-api-connector/3280/1 "2016-05-29T18:45:21Z")

</div>

I’m trying to make a simple send message call using twilio and the API connector.

However anything I try I’m getting a no credentials provided error.

Anyone had success using twilio without blockspring?

Is there anything wrong with my call?

 ![](https://us1.discourse-cdn.com/bubble/original/2X/5/5403beb9d7f2114c1dcb91b9b3cc771aafcb0576.PNG)  
 ![](https://us1.discourse-cdn.com/bubble/original/2X/5/557c8f9bcb9cdcc01aa7e661c26eb0e4a0e3e1cd.PNG)

---

<div class="post-metadata">

**Author:** ![nicolas.daprigny](https://avatars.discourse-cdn.com/v4/letter/n/b38774/32.png) [@nicolas.daprigny](https://forum.bubble.io/u/nicolas.daprigny)\
**Post date:** [May 29, 2016, 7:09pm UTC](https://forum.bubble.io/t/twilio-and-api-connector/3280/2 "2016-05-29T19:09:12Z")

</div>

I tried it this way with my Test Credidentials

 ![](https://us1.discourse-cdn.com/bubble/original/2X/a/a408397f1df4a9a45adbff5b4e2782faeb2cf022.png)

but I get the same Error you have

---

<div class="post-metadata">

**Author:** ![emmanuel](https://sea1.discourse-cdn.com/bubble/user_avatar/forum.bubble.io/emmanuel/32/27657_2.png) [@emmanuel](https://forum.bubble.io/u/emmanuel)\
**Post date:** [May 30, 2016, 5:44am UTC](https://forum.bubble.io/t/twilio-and-api-connector/3280/3 "2016-05-30T05:44:32Z")

</div>

And how is it with postman?

---

<div class="post-metadata">

**Author:** ![cho](https://avatars.discourse-cdn.com/v4/letter/c/f17d59/32.png) [@cho](https://forum.bubble.io/u/cho)\
**Post date:** [May 30, 2016, 7:59pm UTC](https://forum.bubble.io/t/twilio-and-api-connector/3280/4 "2016-05-30T19:59:57Z")

</div>

Same.

 ![](https://us1.discourse-cdn.com/bubble/original/2X/c/ccd156af25dd35b63f6221cb80012bd39926e567.PNG)

---

<div class="post-metadata">

**Author:** ![nicolas.daprigny](https://avatars.discourse-cdn.com/v4/letter/n/b38774/32.png) [@nicolas.daprigny](https://forum.bubble.io/u/nicolas.daprigny)\
**Post date:** [May 30, 2016, 8:45pm UTC](https://forum.bubble.io/t/twilio-and-api-connector/3280/5 "2016-05-30T20:45:07Z")

</div>

can you tried following these ? I’ll do it later on

> <https://stackoverflow.com/questions/32078510/postman-twilio-rest-api>

  

> <https://stackoverflow.com/questions/18264601/how-to-send-a-correct-authorization-header-for-basic-authentication>

---

<div class="post-metadata">

**Author:** ![cho](https://avatars.discourse-cdn.com/v4/letter/c/f17d59/32.png) [@cho](https://forum.bubble.io/u/cho)\
**Post date:** [May 30, 2016, 10:26pm UTC](https://forum.bubble.io/t/twilio-and-api-connector/3280/6 "2016-05-30T22:26:43Z")

</div>

Oh yeah that helps!  
So I made it work with postman, all you need to do is generate that authorization parameter and add it to the header.

It’ll look like this:

 ![](https://us1.discourse-cdn.com/bubble/original/2X/8/8d7c70546e78fb3b8ba0997ba01d5d412e6e59bd.PNG)

But here is another problem, for some reason it works when my body is “form-data” but it doesn’t when it’s “JSON”  
I do add the ‘Content-Type application/json’ to the but still getting an error saying that I must provide a From number, which I do in the JSON.

Any ideas?

 ![](https://us1.discourse-cdn.com/bubble/original/2X/b/b804a16ef7940f58610241bf4a218adaeb834c60.PNG)

 ![](https://us1.discourse-cdn.com/bubble/original/2X/d/d174dfc3b1c1afbd6d10756e777f74b0253e76cd.PNG)

---

<div class="post-metadata">

**Author:** ![nicolas.daprigny](https://avatars.discourse-cdn.com/v4/letter/n/b38774/32.png) [@nicolas.daprigny](https://forum.bubble.io/u/nicolas.daprigny)\
**Post date:** [May 30, 2016, 10:58pm UTC](https://forum.bubble.io/t/twilio-and-api-connector/3280/7 "2016-05-30T22:58:40Z")

</div>

Great it helped. Where did you generate the Authorization key ? I tried to find it in my console but could not.

About your “missing” number, why do you use the body ? I mean, can’t you set the parameters like I did on my screenshot ?

---

<div class="post-metadata">

**Author:** ![cho](https://avatars.discourse-cdn.com/v4/letter/c/f17d59/32.png) [@cho](https://forum.bubble.io/u/cho)\
**Post date:** [May 30, 2016, 11:06pm UTC](https://forum.bubble.io/t/twilio-and-api-connector/3280/8 "2016-05-30T23:06:44Z")

</div>

Because it has to be in the body in order to dynamically change it.  
When you use the workflow action → TWILIO → bubble will allow you to set dynamic data to the body  
You need this to tell the call what’s the current users ‘To’ phone number and also you can change the message that will be sent by changing the “Body”. You can’t set dynamic data to parameters.

First of all you need postman to generate it, get it here: [Postman - Chrome Web Store](https://chrome.google.com/webstore/detail/postman/fhbjgbiflinjbdggehcddcbncdddomop/related)

Here is how you generate it:

 ![](https://us1.discourse-cdn.com/bubble/original/2X/c/c521e753eeedcfd4c3fb0083af055c6fa317263b.PNG)

It’ll automatically add it to your header.

---

<div class="post-metadata">

**Author:** ![nicolas.daprigny](https://avatars.discourse-cdn.com/v4/letter/n/b38774/32.png) [@nicolas.daprigny](https://forum.bubble.io/u/nicolas.daprigny)\
**Post date:** [May 30, 2016, 11:22pm UTC](https://forum.bubble.io/t/twilio-and-api-connector/3280/9 "2016-05-30T23:22:05Z")

</div>

ok thank you for the explanation.

But about this :

> [@cho](#):
>
> Because it has to be in the body in order to dynamically change it.

You just have to check “client-safe” on the left of these parameters and you’ll be able to change it dynamically in your workflow

---

<div class="post-metadata">

**Author:** ![cho](https://avatars.discourse-cdn.com/v4/letter/c/f17d59/32.png) [@cho](https://forum.bubble.io/u/cho)\
**Post date:** [May 30, 2016, 11:26pm UTC](https://forum.bubble.io/t/twilio-and-api-connector/3280/10 "2016-05-30T23:26:44Z")

</div>

I didn’t even realize that! Thanks.

But I’m not sure if you can put that in the header… it doesn’t work for me…

---

<div class="post-metadata">

**Author:** ![nicolas.daprigny](https://avatars.discourse-cdn.com/v4/letter/n/b38774/32.png) [@nicolas.daprigny](https://forum.bubble.io/u/nicolas.daprigny)\
**Post date:** [May 30, 2016, 11:28pm UTC](https://forum.bubble.io/t/twilio-and-api-connector/3280/11 "2016-05-30T23:28:22Z")

</div>

you mean you set the parameters like i did on my first screenshot ?

> [@Twilio and API Connector](http://forum.bubble.io/t/twilio-and-api-connector/3280/2):
>
> I tried it this way with my Test Credidentials but I get the same Error you have

---

<div class="post-metadata">

**Author:** ![cho](https://avatars.discourse-cdn.com/v4/letter/c/f17d59/32.png) [@cho](https://forum.bubble.io/u/cho)\
**Post date:** [May 30, 2016, 11:31pm UTC](https://forum.bubble.io/t/twilio-and-api-connector/3280/12 "2016-05-30T23:31:47Z")

</div>

Yes.

 ![](https://us1.discourse-cdn.com/bubble/original/2X/2/2c5814a9f5c15fee563e95d8dedd26c935b453c1.PNG)

![](https://us1.discourse-cdn.com/bubble/original/2X/f/ff21f03bd934c4863b7b47b6c7a34bb3712012be.PNG)

---

<div class="post-metadata">

**Author:** ![nicolas.daprigny](https://avatars.discourse-cdn.com/v4/letter/n/b38774/32.png) [@nicolas.daprigny](https://forum.bubble.io/u/nicolas.daprigny)\
**Post date:** [May 30, 2016, 11:45pm UTC](https://forum.bubble.io/t/twilio-and-api-connector/3280/13 "2016-05-30T23:45:19Z")

</div>

Too bad, I get the same error about the “From” required (in Bubble, and in Postman).  
I also tried a [magical number](https://www.twilio.com/docs/api/rest/test-credentials#test-sms-messages-parameters-From) like +15005550006 but the error codes stands the issue isn’t here anyway.

---

<div class="post-metadata">

**Author:** ![cho](https://avatars.discourse-cdn.com/v4/letter/c/f17d59/32.png) [@cho](https://forum.bubble.io/u/cho)\
**Post date:** [May 31, 2016, 9:11pm UTC](https://forum.bubble.io/t/twilio-and-api-connector/3280/14 "2016-05-31T21:11:24Z")

</div>

I’m seriously considering giving up and just use blockspring…

So I figured out that Twilio need urlencoded data - you can’t send JSON format to twilio!

It’s very important.

More info on it here: [https://twilio.radicalskills.com/projects/getting-started-with-twilio/2.html](https://twilio.radicalskills.com/projects/getting-started-with-twilio/2.html)

So you want to use an encoder like this one: [URL Decoder/Encoder](http://meyerweb.com/eric/tools/dencoder/)

To create a post like this one: From=%2B12048178626&To=%2B13235435405&Body=hello

You also have to make the Content-Type into application/x-www-form-urlencoded

It’ll look like this:

 ![](https://us1.discourse-cdn.com/bubble/original/2X/7/7a8c6a909a4805701f0f839cfa12f458739871de.PNG)

Setting all these I can make it work from POSTMAN

 ![](https://us1.discourse-cdn.com/bubble/original/2X/9/9dd797e1b1e999fda513e206a33f9d052b6bd65b.PNG)

BUT when I put the exact same request into the Bubble API Connector as seen below:

 ![](https://us1.discourse-cdn.com/bubble/original/2X/c/ced96a38deb13b695ac75ba257ab213ad20a7ecd.PNG)

I GET THE SAME EXACT ERROR about the From number not being provided.

So at this point, I have NO IDEA what else I could do…

Hopefully someone can take it from here and figure out what will make this work.

---

<div class="post-metadata">

**Author:** ![nicolas.daprigny](https://avatars.discourse-cdn.com/v4/letter/n/b38774/32.png) [@nicolas.daprigny](https://forum.bubble.io/u/nicolas.daprigny)\
**Post date:** [May 31, 2016, 10:13pm UTC](https://forum.bubble.io/t/twilio-and-api-connector/3280/15 "2016-05-31T22:13:37Z")

</div>

Thanks @cho for seeking.  
I asked 3 days ago emmanuel about encoding. Then RawUrlEncoded has been added in “:formatted as”. It’s different from :UrlEncoded so I don’t think it would work.  
I’ll email him about it. We’ll see and I’ll come back here to inform you.

---

<div class="post-metadata">

**Author:** ![cho](https://avatars.discourse-cdn.com/v4/letter/c/f17d59/32.png) [@cho](https://forum.bubble.io/u/cho)\
**Post date:** [May 31, 2016, 10:31pm UTC](https://forum.bubble.io/t/twilio-and-api-connector/3280/16 "2016-05-31T22:31:13Z")

</div>

Even if they add it, the request still doesn’t work.

---

<div class="post-metadata">

**Author:** ![NigelG](https://avatars.discourse-cdn.com/v4/letter/n/ea5d25/32.png) [@NigelG](https://forum.bubble.io/u/NigelG)\
**Post date:** [June 1, 2016, 6:09am UTC](https://forum.bubble.io/t/twilio-and-api-connector/3280/17 "2016-06-01T06:09:32Z")

</div>

Have you looked at Zapier ? I have Twillio SMS messages going out if Bubble and back in too.

---

<div class="post-metadata">

**Author:** ![cho](https://avatars.discourse-cdn.com/v4/letter/c/f17d59/32.png) [@cho](https://forum.bubble.io/u/cho)\
**Post date:** [June 1, 2016, 7:03am UTC](https://forum.bubble.io/t/twilio-and-api-connector/3280/18 "2016-06-01T07:03:49Z")

</div>

It’d probably work - I’ve made it work with blockspring before but the idea would be not to pay a 3rd party just for implementing twilio.

---

<div class="post-metadata">

**Author:** ![cho](https://avatars.discourse-cdn.com/v4/letter/c/f17d59/32.png) [@cho](https://forum.bubble.io/u/cho)\
**Post date:** [June 1, 2016, 7:28am UTC](https://forum.bubble.io/t/twilio-and-api-connector/3280/19 "2016-06-01T07:28:30Z")

</div>

ISSUE SOLVED!

The easiest way of using the twilio api if you are NOT using the twilio api.

Just use [www.plivo.com](http://www.plivo.com) instead.

It took 4 minutes to learn and integrate their api.

Works. Just. Fine.

 ![](https://us1.discourse-cdn.com/bubble/original/2X/e/e9cfeaf33481ba02c72feff7bdbddd1b999d48c9.PNG)

---

<div class="post-metadata">

**Author:** ![NigelG](https://avatars.discourse-cdn.com/v4/letter/n/ea5d25/32.png) [@NigelG](https://forum.bubble.io/u/NigelG)\
**Post date:** [June 1, 2016, 8:12am UTC](https://forum.bubble.io/t/twilio-and-api-connector/3280/20 "2016-06-01T08:12:25Z")

</div>

That’s great ! Must say the Twilio API documentation is pretty poor. This one sounds like it is a lot clearer, good find.

An API documentation review site for nocoders would be useful 😃

[Next page](https://forum.bubble.io/t/twilio-and-api-connector/3280.md?page=2)
