Did I find the right examples for you? yes no

All Samples(23)  |  Call(15)  |  Derive(0)  |  Import(8)
A token to control permissions with Twilio Client

:param str account_sid: the account sid to which this token
                           is granted access
:param str auth_token: the secret key used to sign the token.
                          Note, this auth token is not visible to the
                          user of the token.

:returns: A new TwilioCapability with zero permissions

src/t/w/Twilio-Karaoke-HEAD/app.py   Twilio-Karaoke(Download)
import flask
from twilio import twiml
from twilio.util import TwilioCapability
import os
 
def mic():
    capability = TwilioCapability(os.environ.get('ACCOUNT_SID'), 
            os.environ.get('AUTH_TOKEN'))
    capability.allow_client_outgoing('AP2b4a0d70f02c4088b92f064607a95025')
    token = capability.generate()
def speaker():
    capability = TwilioCapability(os.environ.get('ACCOUNT_SID'), 
            os.environ.get('AUTH_TOKEN'))
    capability.allow_client_outgoing(os.environ.get('SPEAKER_APP_SID'))
    token = capability.generate()

src/h/o/howtos-HEAD/intercom/main.py   howtos(Download)
from google.appengine.ext.webapp import template
from google.appengine.ext.webapp import util
from twilio.util import TwilioCapability
 
 
        client_name = user.email().split("@")[0]
 
        capability = TwilioCapability(settings.ACCOUNT_SID,
            settings.AUTH_TOKEN)
        capability.allow_client_outgoing(settings.APP_SID)

src/r/e/Reasons-Sonya-Is-Awesome-HEAD/app.py   Reasons-Sonya-Is-Awesome(Download)
from flask import render_template
from twilio import twiml
from twilio.util import TwilioCapability
from twilio.rest import TwilioRestClient
import os
def index():
    reason = reasonSonyaIsAwesome()
    capability = TwilioCapability(app.config['ACCOUNT_SID'],
        app.config['AUTH_TOKEN'])
    capability.allow_client_outgoing(app.config['SONYA_APP_SID'])

src/p/h/phonefree-twilio-HEAD/main.py   phonefree-twilio(Download)
 
from dataModel import *
from twilio.util import TwilioCapability
from twilio import twiml, TwilioRestException
from twilio.rest import TwilioRestClient
      # if so, look at the user model to see if they are the owner
      # if not, offer the user the ability to authorize the site (this should only happen once)
      capability = TwilioCapability(configuration.TWILIO_ACCOUNT_SID,configuration.TWILIO_AUTH_TOKEN)
      voicemail = []
      if user.activated is False:

src/t/w/Twilio-Hackpack-for-Heroku-and-Flask-HEAD/hackpack/app.py   Twilio-Hackpack-for-Heroku-and-Flask(Download)
 
from twilio import twiml
from twilio.util import TwilioCapability
 
# Declare and configure application
 
    if not configuration_error:
        capability = TwilioCapability(app.config['TWILIO_ACCOUNT_SID'],
            app.config['TWILIO_AUTH_TOKEN'])
        capability.allow_client_incoming("joey_ramone")

src/p/r/Prank-Roulette-HEAD/app.py   Prank-Roulette(Download)
import twilio.twiml
from flask import Flask, render_template, request
from twilio.util import TwilioCapability
from werkzeug.contrib.fixers import ProxyFix
 
def main_page():
    """Respond to incoming requests."""
    capability = TwilioCapability(account_sid, auth_token)
 
    capability.allow_client_outgoing(application_sid)

src/h/a/Hacker-Hotline-HEAD/app.py   Hacker-Hotline(Download)
from twilio import twiml
from twilio.rest import TwilioRestClient
from twilio.util import TwilioCapability
 
 
            token = None
    if not configuration_error:
        capability = TwilioCapability(app.config['TWILIO_ACCOUNT_SID'],
            app.config['TWILIO_AUTH_TOKEN'])
        capability.allow_client_incoming("joey_ramone")

src/t/w/twilio-python-HEAD/tests/test_jwt.py   twilio-python(Download)
 
from twilio import jwt
from twilio.util import TwilioCapability
 
 
    def test_no_permissions(self):
        token = TwilioCapability("AC123", "XXXXX")
        payload = token.payload()
        assert_equal(len(payload), 1)
        assert_equal(payload["scope"], '')
 
    def test_inbound_permissions(self):
        token = TwilioCapability("AC123", "XXXXX")
    def test_outbound_permissions(self):
        token = TwilioCapability("AC123", "XXXXX")
        token.allow_client_outgoing("AP123")
        payload = token.payload()
 
    def test_outbound_permissions_params(self):
        token = TwilioCapability("AC123", "XXXXX")
        token.allow_client_outgoing("AP123", foobar=3)
        payload = token.payload()