This is a simple application that integrates Tropo with Spark. When a user texts the Tropo number, their text is posted to a specific Spark room. This app is an introductory tutorial to the Tropo Scripting API and Spark Web API.
- Clone this repo onto your machine
- Register on Spark
Go to https://web.ciscospark.com/#/signin and enter your email.
Cisco will send an email to confirm your email. Then you will set your password.
After that it will log you into the Spark chat room.
<script async src="//embedr.flickr.com/assets/client-code.js" charset="utf-8"></script>
- Get Spark Access Token
- Go to https://developer.ciscospark.com
- Click Login. It should automatically log you in since you already logged in to Spark.
- Click the avatar in the right hand upper corner.
- Click Copy.
<script async src="//embedr.flickr.com/assets/client-code.js" charset="utf-8"></script> - In heroku/constants.py replace 'Put your token here' on line 19 with your access token.
<script async src="//embedr.flickr.com/assets/client-code.js" charset="utf-8"></script> - Commit your change.
-
Register on Tropo
-
Go to https://www.tropo.com
-
Click Register
-
Submit the registration form
-
Check your email and confirm your account
-
Create new scripting app
-
Click Create New App
-
Name your app
<script async src="//embedr.flickr.com/assets/client-code.js" charset="utf-8"></script> -
Create new script
1. Click on New script. 2. Paste the code from tropo/spark.py, enter the filename and click Save.
<script async src="//embedr.flickr.com/assets/client-code.js" charset="utf-8"></script> -
Click CREATE APP
-
Add number
-
Scroll down to the Numbers section
-
Select Country
-
Select Region
-
Click ADD
<script async src="//embedr.flickr.com/assets/client-code.js" charset="utf-8"></script>
-
Sign up or Log in to Heroku: https://www.heroku.com
-
Create new app
-
Click the + icon in the upper right hand corner.
<script async src="//embedr.flickr.com/assets/client-code.js" charset="utf-8"></script> -
Select Create new app
-
Enter your app name
-
Select the region for app's runtime (eg. United States or Europe).
-
Click Create App
<script async src="//embedr.flickr.com/assets/client-code.js" charset="utf-8"></script> -
Deploy the app.
Note: you should be on the Deploy tab.
<script async src="//embedr.flickr.com/assets/client-code.js" charset="utf-8"></script> -
Scroll down to the section Deploy using Heroku Git.
<script async src="//embedr.flickr.com/assets/client-code.js" charset="utf-8"></script> -
Follow the instructions.
Note: You will not need to entergit init
since the repo was cloned. -
Enter heroku app name in Tropo script
-
On your Tropo app, click Edit script
-
Change the url on line 15 to your Heroku app url
<script async src="//embedr.flickr.com/assets/client-code.js" charset="utf-8"></script>
- Congratulations! Your app is live.
- Text the Tropo number and watch your text post in Spark. :)
<script async src="//embedr.flickr.com/assets/client-code.js" charset="utf-8"></script>
<script async src="//embedr.flickr.com/assets/client-code.js" charset="utf-8"></script>