Twilio and API Connector

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?


I tried it this way with my Test Credidentials

but I get the same Error you have

1 Like

And how is it with postman?

1 Like

Same.

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


2 Likes

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:

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?

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 ?

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

Here is how you generate it:

It’ll automatically add it to your header.

ok thank you for the explanation.

But about this :

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

1 Like

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…

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

Yes.

Too bad, I get the same error about the “From” required (in Bubble, and in Postman).
I also tried a magical number like +15005550006 but the error codes stands the issue isn’t here anyway.

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

So you want to use an encoder like this one: URL Decoder/Encoder

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:

Setting all these I can make it work from POSTMAN

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

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.

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.

1 Like

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

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

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.

ISSUE SOLVED!

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

Just use www.plivo.com instead.

It took 4 minutes to learn and integrate their api.

Works. Just. Fine.

6 Likes

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 :smiley:

2 Likes