Created
January 15, 2015 18:59
-
-
Save vshank77/55f1b05d426ff0080c35 to your computer and use it in GitHub Desktop.
Twilio Token Generator
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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