Using ThingHTTP with Tropo | ThingSpeak Apps | Forum

Avatar

Please consider registering
Guest

sp_LogInOut Log In sp_Registration Register

Register | Lost password?
Advanced Search

— Forum Scope —






— Match —





— Forum Options —





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

sp_Feed sp_TopicIcon
Using ThingHTTP with Tropo
No permission to create posts
November 22, 2016
8:31 pm
Avatar
irasch

Silver
Members
Forum Posts: 7
Member Since:
November 22, 2016
sp_UserOfflineSmall Offline

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. 

November 23, 2016
6:11 pm
Avatar
Vinod

MathWorks
Members
Forum Posts: 215
Member Since:
May 1, 2016
sp_UserOfflineSmall Offline

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.

November 25, 2016
11:40 am
Avatar
irasch

Silver
Members
Forum Posts: 7
Member Since:
November 22, 2016
sp_UserOfflineSmall Offline

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. 

November 25, 2016
11:59 am
Avatar
Vinod

MathWorks
Members
Forum Posts: 215
Member Since:
May 1, 2016
sp_UserOfflineSmall Offline

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

That said, the right solution is the body substitutions.

November 25, 2016
12:10 pm
Avatar
irasch

Silver
Members
Forum Posts: 7
Member Since:
November 22, 2016
sp_UserOfflineSmall Offline

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.

November 26, 2016
5:37 pm
Avatar
irasch

Silver
Members
Forum Posts: 7
Member Since:
November 22, 2016
sp_UserOfflineSmall Offline

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. 

November 27, 2016
1:48 pm
Avatar
Vinod

MathWorks
Members
Forum Posts: 215
Member Since:
May 1, 2016
sp_UserOfflineSmall Offline

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.

September 3, 2017
5:05 pm
Avatar
irasch

Silver
Members
Forum Posts: 7
Member Since:
November 22, 2016
sp_UserOfflineSmall Offline

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: James181
25 Guest(s)

Currently Browsing this Page:
1 Guest(s)

Top Posters:

rw950431: 261

Vinod: 196

piajola: 85

turgo: 70

vespapierre: 63

Adarsh_Murthy: 62

Member Stats:

Guest Posters: 1

Members: 5703

Moderators: 0

Admins: 2

Forum Stats:

Groups: 4

Forums: 17

Topics: 1313

Posts: 4565

Newest Members:

James181, kimberlypg2, JamesAdorb, waynesmith, paulettebw60, ashleytb4

Administrators: Hans: 387, lee: 457