Skip to content

Instantly share code, notes, and snippets.

@vshank77
Created January 15, 2015 18:59
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save vshank77/55f1b05d426ff0080c35 to your computer and use it in GitHub Desktop.
Save vshank77/55f1b05d426ff0080c35 to your computer and use it in GitHub Desktop.
Twilio Token Generator
import blockspring
from twilio.util import TwilioCapability
def block(request, response):
account_sid = request.params["account_sid"]
auth_token = request.params["auth_token"]
application_sid = request.params["application_sid"]
capability = TwilioCapability(account_sid, auth_token)
capability.allow_client_outgoing(application_sid)
token = capability.generate()
response.addOutput("token", token)
response.end()
blockspring.define(block)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment