This repository was archived by the owner on Aug 15, 2024. It is now read-only.
File tree Expand file tree Collapse file tree 2 files changed +4
-5
lines changed
rest/access-tokens/sync-example Expand file tree Collapse file tree 2 files changed +4
-5
lines changed Original file line number Diff line number Diff line change 55account_sid = ENV [ 'TWILIO_ACCOUNT_SID' ]
66api_key = ENV [ 'TWILIO_API_KEY' ]
77api_secret = ENV [ 'TWILIO_API_KEY_SECRET' ]
8- twilioSyncService = ENV [ 'TWILIO_SYNC_SERVICE_SID' ]
8+ twilio_sync_service = ENV [ 'TWILIO_SYNC_SERVICE_SID' ]
99
1010
1111# Required for Sync
12- outgoing_application_sid = 'APxxxxxxxxxxxx'
1312identity = 'user'
1413
1514# Create Sync grant for our token
1615grant = Twilio ::JWT ::AccessToken ::SyncGrant . new
1716
1817# Create a "grant" which enables a client to use Sync as a given user
19- grant . serviceSid = twilioSyncService
18+ grant . service_sid = twilio_sync_service
2019
2120# Create an Access Token
2221token = Twilio ::JWT ::AccessToken . new (
Original file line number Diff line number Diff line change 77account_sid = os .environ ['TWILIO_ACCOUNT_SID' ]
88api_key = os .environ ['TWILIO_API_KEY' ]
99api_secret = os .environ ['TWILIO_API_KEY_SECRET' ]
10- twilioSyncService = os .environ [process .env . ['TWILIO_SYNC_SERVICE_SID' ]
10+ twilio_sync_service = os .environ [process .env . ['TWILIO_SYNC_SERVICE_SID' ]
1111
1212# required for Sync grant
1313identity = 'user'
1818# Create a Sync grant and add to token
1919sync_grant = SyncGrant (
2020 # Create a "grant" which enables a client to use Sync as a given user
21- serviceSid = twilioSyncService
21+ serviceSid = twilio_sync_service
2222)
2323
2424token .add_grant (sync_grant )
You can’t perform that action at this time.
0 commit comments