[Solved] Run in Curl but it doesn't in Losant

#1

I run this command and it works well

curl -X POST https://studio.twilio.com/v1/Flows/FWc5598133xxxxxxxxxxx9e724dee0c/Executions \

–data-urlencode “To=+1954xxxxx5” \

–data-urlencode “From=+17862xxxxxx” \

-u “AC9xxxxxxxxxxxx9075dd5:c68d7bc01xxxxxxxxx9aaa7598”

But I have tried different ways in Losant http calls and I can’t do it.

Somebody already communicate successful with Twilio API ?

0 Likes

#2

I was able to get it working using the following configuration in an HTTP Node, where the string templates are referencing values on your workflow’s payload. -

Request Method:
POST

URL Template:

https://studio.twilio.com/v1/Flows/{{data.FlowSid}}/Executions

Body Template:

From={{encodeURIComponent data.From}}&To={{encodeURIComponent data.To}}&Parameters={{encodeURIComponent data.Parameters}}

Headers:

Content-Type = application/x-www-form-urlencoded

Authorization Type:

Basic

Username:

{{data.AccountSid}}

Password:

{{data.AuthToken}}
0 Likes

#3

Thanks a lot!. It worked. My problem was in the body template

0 Likes