hollyglot / sparktropo

Simple Spark Tropo Integration app

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Spark Tropo

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.

Setup repo

  1. Clone this repo onto your machine

Setup Spark

  1. 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.

spark_chat<script async src="//embedr.flickr.com/assets/client-code.js" charset="utf-8"></script>

  1. Get Spark Access Token
  2. Go to https://developer.ciscospark.com
  3. Click Login. It should automatically log you in since you already logged in to Spark.
  4. Click the avatar in the right hand upper corner.
  5. Click Copy.
    SparkTropo Screenshots<script async src="//embedr.flickr.com/assets/client-code.js" charset="utf-8"></script>
  6. In heroku/constants.py replace 'Put your token here' on line 19 with your access token.
    Screen Shot 2016-02-17 at 3.41.28 PM<script async src="//embedr.flickr.com/assets/client-code.js" charset="utf-8"></script>
  7. Commit your change.

Setup Tropo

  1. Register on Tropo

  2. Go to https://www.tropo.com

  3. Click Register

  4. Submit the registration form

  5. Check your email and confirm your account

  6. Create new scripting app

  7. Click Create New App

  8. Name your app
    tropo_app_name<script async src="//embedr.flickr.com/assets/client-code.js" charset="utf-8"></script>

  9. Create new script
    1. Click on New script. 2. Paste the code from tropo/spark.py, enter the filename and click Save.
    tropo_script<script async src="//embedr.flickr.com/assets/client-code.js" charset="utf-8"></script>

  10. Click CREATE APP

  11. Add number

  12. Scroll down to the Numbers section

  13. Select Country

  14. Select Region

  15. Click ADD
    tropo_number<script async src="//embedr.flickr.com/assets/client-code.js" charset="utf-8"></script>

Setup Heroku

  1. Sign up or Log in to Heroku: https://www.heroku.com

  2. Create new app

  3. Click the + icon in the upper right hand corner.
    heroku_plus<script async src="//embedr.flickr.com/assets/client-code.js" charset="utf-8"></script>

  4. Select Create new app

  5. Enter your app name

  6. Select the region for app's runtime (eg. United States or Europe).

  7. Click Create App
    heroku_app<script async src="//embedr.flickr.com/assets/client-code.js" charset="utf-8"></script>

  8. Deploy the app.
    Note: you should be on the Deploy tab.
    deploy<script async src="//embedr.flickr.com/assets/client-code.js" charset="utf-8"></script>

  9. Scroll down to the section Deploy using Heroku Git.
    deploy_git<script async src="//embedr.flickr.com/assets/client-code.js" charset="utf-8"></script>

  10. Follow the instructions.
    Note: You will not need to enter git init since the repo was cloned.

  11. Enter heroku app name in Tropo script

  12. On your Tropo app, click Edit script

  13. Change the url on line 15 to your Heroku app url
    tropo_update<script async src="//embedr.flickr.com/assets/client-code.js" charset="utf-8"></script>

Play with your app

  1. Congratulations! Your app is live.
  2. Text the Tropo number and watch your text post in Spark. :)

Text

Tropo texting<script async src="//embedr.flickr.com/assets/client-code.js" charset="utf-8"></script>

Chat

chat_posted<script async src="//embedr.flickr.com/assets/client-code.js" charset="utf-8"></script>

About

Simple Spark Tropo Integration app


Languages

Language:Python 100.0%