Skip to content
This repository was archived by the owner on Aug 15, 2024. It is now read-only.

Commit ba61cad

Browse files
committed
updated as per @anabenites suggestions
1 parent 223bc79 commit ba61cad

File tree

2 files changed

+4
-5
lines changed

2 files changed

+4
-5
lines changed

rest/access-tokens/sync-example/sync-example.5.x.rb

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,18 +5,17 @@
55
account_sid = ENV['TWILIO_ACCOUNT_SID']
66
api_key = ENV['TWILIO_API_KEY']
77
api_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'
1312
identity = 'user'
1413

1514
# Create Sync grant for our token
1615
grant = 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
2221
token = Twilio::JWT::AccessToken.new(

rest/access-tokens/sync-example/sync-example.6.x.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
account_sid = os.environ['TWILIO_ACCOUNT_SID']
88
api_key = os.environ['TWILIO_API_KEY']
99
api_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
1313
identity = 'user'
@@ -18,7 +18,7 @@
1818
# Create a Sync grant and add to token
1919
sync_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

2424
token.add_grant(sync_grant)

0 commit comments

Comments
 (0)