Using ThingHTTP with Tropo | ThingSpeak Apps | Forum

Avatar

Please consider registering
Guest

Search

— Forum Scope —






— Match —





— Forum Options —





Minimum search word length is 3 characters - maximum search word length is 84 characters

Register Lost password?
sp_Feed sp_TopicIcon
Using ThingHTTP with Tropo
Avatar
irasch

Silver
Forum Posts: 7
sp_UserOfflineSmall Offline
1
November 22, 2016 - 8:31 pm
sp_Permalink sp_Print

Hi,

I found a ThingHTTP app that will allow me to send SMS messages through Twilio from an Arduino. The instructions to set it up are below, and it works:

Copy the following data into the fields. Where italics and caps you must replace with the data from Twilio.

  1. Name it Twilio Send SMS
  2. URL is https://api.twilio.com/2010-04-01/Accounts/YOUR TWILIO ACCOUNT SID/SMS/Messages
  3. HTTP Auth Username is YOUR TWILIO ACCOUNT SID
  4. HTTP Auth Password is YOUR TWILIO AUTH TOKEN
  5. Set the method to POST
  6. Content type is application/x-www-form-urlencoded
  7. Click remove headers, and leave host blank
  8. Body = From=YOUR TWILIO NUMBER&To=%%number%%&Body=%%message%%

Click Save ThingHTTP

However, I'd like to use Tropo instead of Twilio.  Does anyone know how I'd set up the ThingHTTP app for Tropo instead of Twilio?

Thanks. 

Avatar
Vinod

Forum Posts: 186
sp_UserOfflineSmall Offline
2
November 23, 2016 - 6:11 pm
sp_Permalink sp_Print

Assuming you have a tropo URL like this:

https://api.tropo.com/1.0/sessions?action=create&token=***YOUR_TROPO_TOKEN_HERE***

you can create a new thingHTTP and set the URL parameter of the thingHTTP to the string above and hit save.

Now you have a ThingSpeak URL you can hit, like 

https://api.thingspeak.com/apps/thinghttp/send_request?api_key=***YOUR_THINGSPEAK_API_KEY*** 

and it should trigger tropo.

My recommendation is to first test your tropo link to confirm it works, then code it into a thingHTTP.

Avatar
irasch

Silver
Forum Posts: 7
sp_UserOfflineSmall Offline
3
November 25, 2016 - 11:40 am
sp_Permalink sp_Print

I've made a little progress, but still have a problem. If I set up the Choreo like this:

 

Name: TropoSendSMS

APIKey: xxxxx

URL: https://api.tropo.com/1.0/sessions?action=create&token=***tropokey***&phone=6095551212&msg=Test2

Method: GET

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

HTTP Version: 1.0

Host: https://api.tropo.com

Body: doesn't matter

It works. But since the phone number and message text are up in the URL, I can't substitute for them So I try to put them in the body:

 

Name: TropoSendSMS

APIKey: xxxxx

URL: https://api.tropo.com/1.0/sessions?action=create&token=***tropokey***

Method: GET

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

HTTP Version: 1.0

Host: https://api.tropo.com

Body: &phone=6095551212&msg=Test2

It fails.  When I look at the Tropo error, it says that a phone number is not being provided. 

[I know that in the Body area I can make substitutions for the phone number and text, but for now I'm keeping it simple until the Choreo works.]

Any idea why moving the phone and message from the URL to the Body fails? 

Thanks. 

Avatar
Vinod

Forum Posts: 186
sp_UserOfflineSmall Offline
4
November 25, 2016 - 11:59 am
sp_Permalink sp_Print

It could be because of some parsing of the '&' character. try replacing them with '&'

That said, the right solution is the body substitutions.

Avatar
irasch

Silver
Forum Posts: 7
sp_UserOfflineSmall Offline
5
November 25, 2016 - 12:10 pm
sp_Permalink sp_Print

Do you know if the "body" portion is appended to the URL when Thingspeak makes the request to Tropo, or does the body go in a separate send? 

Thanks.

Avatar
irasch

Silver
Forum Posts: 7
sp_UserOfflineSmall Offline
6
November 26, 2016 - 5:37 pm
sp_Permalink sp_Print

I was able to get this working by changing Thinkspeak from GET to POST. Apparently when Tropo receives via POST, it checks the Body for the info. THanks. 

Avatar
Vinod

Forum Posts: 186
sp_UserOfflineSmall Offline
7
November 27, 2016 - 1:48 pm
sp_Permalink sp_Print

Happy to hear you got it working.

Would you be interested in writing a blog post like the ones on http://community.thingspeak.com on how you use Tropo and ThingSpeak for your application?

I'm sure other members of the ThingSpeak community can learn from your success.

Avatar
irasch

Silver
Forum Posts: 7
sp_UserOfflineSmall Offline
8
September 3, 2017 - 5:05 pm
sp_Permalink sp_Print

My app has been working fine since November 2016. Then on August 16, it stopped working. It doesn't appear that the request is going through to Tropo. Nothing at all changed - any idea what might have happened? Thanks. 

Forum Timezone: America/New_York

Most Users Ever Online: 114

Currently Online:
22 Guest(s)

Currently Browsing this Page:
1 Guest(s)

Top Posters:

rw950431: 252

Vinod: 164

cstapels: 96

piajola: 75

vespapierre: 63

Adarsh_Murthy: 59

Newest Members:

dannymm1

KamorkasOr

GRV2903

Jusikaclaiz

Raymondpoers

ScottDus

Forum Stats:

Groups: 4

Forums: 17

Topics: 1313

Posts: 4565

 

Member Stats:

Guest Posters: 1

Members: 5703

Moderators: 0

Admins: 2

Administrators: Hans, lee