File tree Expand file tree Collapse file tree 18 files changed +253
-0
lines changed
service-multiple-number-add Expand file tree Collapse file tree 18 files changed +253
-0
lines changed Original file line number Diff line number Diff line change
1
+ # Download the Python helper library from twilio.com/docs/python/install
2
+ from twilio .rest import Client
3
+
4
+ # Your Account Sid and Auth Token from twilio.com/console
5
+ account_sid = "ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX"
6
+ auth_token = "your_auth_token"
7
+ client = Client (account_sid , auth_token )
8
+
9
+ alpha_sender = client .messaging \
10
+ .services (sid = "MG2172dd2db502e20dd981ef0d67850e1a" ) \
11
+ .alpha_senders \
12
+ .create (alpha_sender = "My company" )
13
+
14
+ print (alpha_sender .sid )
Original file line number Diff line number Diff line change
1
+ # Download the Python helper library from twilio.com/docs/python/install
2
+ from twilio .rest import Client
3
+
4
+ # Your Account Sid and Auth Token from twilio.com/console
5
+ account_sid = "ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX"
6
+ auth_token = "your_auth_token"
7
+ client = Client (account_sid , auth_token )
8
+
9
+ did_delete = client .messaging \
10
+ .services (sid = "MG2172dd2db502e20dd981ef0d67850e1a" ) \
11
+ .alpha_senders (sid = "AIc781610ec0b3400c9e0cab8e757da937" ) \
12
+ .delete ()
13
+
14
+ print (did_delete )
Original file line number Diff line number Diff line change
1
+ # Download the Python helper library from twilio.com/docs/python/install
2
+ from twilio .rest import Client
3
+
4
+ # Your Account Sid and Auth Token from twilio.com/console
5
+ account_sid = "ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX"
6
+ auth_token = "your_auth_token"
7
+ client = Client (account_sid , auth_token )
8
+
9
+ alpha_sender = client .messaging \
10
+ .services (sid = "MG2172dd2db502e20dd981ef0d67850e1a" ) \
11
+ .alpha_senders (sid = "AIc781610ec0b3400c9e0cab8e757da937" ) \
12
+ .fetch ()
13
+
14
+ print (alpha_sender .alpha_sender )
Original file line number Diff line number Diff line change
1
+ # Download the Python helper library from twilio.com/docs/python/install
2
+ from twilio .rest import Client
3
+
4
+ # Your Account Sid and Auth Token from twilio.com/console
5
+ account_sid = "ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX"
6
+ auth_token = "your_auth_token"
7
+ client = Client (account_sid , auth_token )
8
+
9
+ alpha_senders = client .messaging \
10
+ .services (sid = "MG2172dd2db502e20dd981ef0d67850e1a" ) \
11
+ .alpha_senders \
12
+ .list ()
13
+
14
+ for alpha_sender in alpha_senders :
15
+ print (alpha_senders .sid )
Original file line number Diff line number Diff line change
1
+ # Download the Python helper library from twilio.com/docs/python/install
2
+ from twilio .rest import Client
3
+
4
+ # Your Account Sid and Auth Token from twilio.com/console
5
+ account_sid = "ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX"
6
+ auth_token = "your_auth_token"
7
+ client = Client (account_sid , auth_token )
8
+
9
+ service = client .messaging \
10
+ .services \
11
+ .create (friendly_name = "My First Service" )
12
+
13
+ print (service .sid )
Original file line number Diff line number Diff line change
1
+ # Download the Python helper library from twilio.com/docs/python/install
2
+ from twilio .rest import Client
3
+
4
+ # Your Account Sid and Auth Token from twilio.com/console
5
+ account_sid = "ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX"
6
+ auth_token = "your_auth_token"
7
+ client = Client (account_sid , auth_token )
8
+
9
+ did_delete = client .messaging \
10
+ .services (sid = "MG2172dd2db502e20dd981ef0d67850e1a" ) \
11
+ .delete ()
12
+
13
+ print (did_delete )
Original file line number Diff line number Diff line change
1
+ # Download the Python helper library from twilio.com/docs/python/install
2
+ from twilio .rest import Client
3
+
4
+ # Your Account Sid and Auth Token from twilio.com/console
5
+ account_sid = "ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX"
6
+ auth_token = "your_auth_token"
7
+ client = Client (account_sid , auth_token )
8
+
9
+ service = client .messaging \
10
+ .services (sid = "MG2172dd2db502e20dd981ef0d67850e1a" ) \
11
+ .fetch ()
12
+
13
+ print (service .friendly_name )
Original file line number Diff line number Diff line change
1
+ # Download the Python helper library from twilio.com/docs/python/install
2
+ from twilio .rest import Client
3
+
4
+ # Your Account Sid and Auth Token from twilio.com/console
5
+ account_sid = "ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX"
6
+ auth_token = "your_auth_token"
7
+ client = Client (account_sid , auth_token )
8
+
9
+ services = client .messaging .services .list ()
10
+
11
+ for service in services :
12
+ print (services .sid )
Original file line number Diff line number Diff line change
1
+ # Download the Python helper library from twilio.com/docs/python/install
2
+ from twilio .rest import Client
3
+
4
+ # Your Account Sid and Auth Token from twilio.com/console
5
+ account_sid = "ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX"
6
+ auth_token = "your_auth_token"
7
+ client = Client (account_sid , auth_token )
8
+
9
+ phone_numbers_sids = ["PN2a0747eba6abf96b7e3c3ff0b4530f6e" ,
10
+ "PN557ce644e5ab84fa21cc21112e22c485" ,
11
+ "PN2a0747eba6abf96b7e3c3ff0b4530f6e" ]
12
+
13
+ for phone_numbers_sid in phone_numbers_sids :
14
+ phone_number = client .messaging \
15
+ .services (sid = "MG2172dd2db502e20dd981ef0d67850e1a" ) \
16
+ .phone_numbers \
17
+ .create (phone_number_sid = phone_numbers_sid )
18
+ print (phone_number .sid )
Original file line number Diff line number Diff line change
1
+ # Download the Python helper library from twilio.com/docs/python/install
2
+ from twilio .rest import Client
3
+
4
+ # Your Account Sid and Auth Token from twilio.com/console
5
+ account_sid = "ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX"
6
+ auth_token = "your_auth_token"
7
+ client = Client (account_sid , auth_token )
8
+
9
+ phone_number = client .messaging \
10
+ .services (sid = "MG2172dd2db502e20dd981ef0d67850e1a" ) \
11
+ .phone_numbers \
12
+ .create (phone_number_sid = "PN557ce644e5ab84fa21cc21112e22c485" )
13
+
14
+ print (phone_number .sid )
Original file line number Diff line number Diff line change
1
+ # Download the Python helper library from twilio.com/docs/python/install
2
+ from twilio .rest import Client
3
+
4
+ # Your Account Sid and Auth Token from twilio.com/console
5
+ account_sid = "ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX"
6
+ auth_token = "your_auth_token"
7
+ client = Client (account_sid , auth_token )
8
+
9
+ did_delete = client .messaging \
10
+ .services (sid = "MG2172dd2db502e20dd981ef0d67850e1a" ) \
11
+ .phone_numbers (sid = "PN557ce644e5ab84fa21cc21112e22c485" ) \
12
+ .delete ()
13
+
14
+ print (did_delete )
Original file line number Diff line number Diff line change
1
+ # Download the Python helper library from twilio.com/docs/python/install
2
+ from twilio .rest import Client
3
+
4
+ # Your Account Sid and Auth Token from twilio.com/console
5
+ account_sid = "ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX"
6
+ auth_token = "your_auth_token"
7
+ client = Client (account_sid , auth_token )
8
+
9
+ phone_number = client .messaging \
10
+ .services (sid = "MG2172dd2db502e20dd981ef0d67850e1a" ) \
11
+ .phone_numbers (sid = "PN557ce644e5ab84fa21cc21112e22c485" ) \
12
+ .fetch ()
13
+
14
+ print (phone_number .country_code )
Original file line number Diff line number Diff line change
1
+ # Download the Python helper library from twilio.com/docs/python/install
2
+ from twilio .rest import Client
3
+
4
+ # Your Account Sid and Auth Token from twilio.com/console
5
+ account_sid = "ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX"
6
+ auth_token = "your_auth_token"
7
+ client = Client (account_sid , auth_token )
8
+
9
+ phone_numbers = client .messaging \
10
+ .services (sid = "MG2172dd2db502e20dd981ef0d67850e1a" ) \
11
+ .phone_numbers \
12
+ .list ()
13
+
14
+ for phone_number in phone_numbers :
15
+ print (phone_number .sid )
Original file line number Diff line number Diff line change
1
+ # Download the Python helper library from twilio.com/docs/python/install
2
+ from twilio .rest import Client
3
+
4
+ # Your Account Sid and Auth Token from twilio.com/console
5
+ account_sid = "ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX"
6
+ auth_token = "your_auth_token"
7
+ client = Client (account_sid , auth_token )
8
+
9
+ short_code = client .messaging \
10
+ .services (sid = "MG2172dd2db502e20dd981ef0d67850e1a" ) \
11
+ .short_codes \
12
+ .create (short_code_sid = "SC3f94c94562ac88dccf16f8859a1a8b25" )
13
+
14
+ print (short_code .sid )
Original file line number Diff line number Diff line change
1
+ # Download the Python helper library from twilio.com/docs/python/install
2
+ from twilio .rest import Client
3
+
4
+ # Your Account Sid and Auth Token from twilio.com/console
5
+ account_sid = "ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX"
6
+ auth_token = "your_auth_token"
7
+ client = Client (account_sid , auth_token )
8
+
9
+ did_delete = client .messaging \
10
+ .services (sid = "MG2172dd2db502e20dd981ef0d67850e1a" ) \
11
+ .short_codes (sid = "SC3f94c94562ac88dccf16f8859a1a8b25" ) \
12
+ .delete ()
13
+
14
+ print (did_delete )
Original file line number Diff line number Diff line change
1
+ # Download the Python helper library from twilio.com/docs/python/install
2
+ from twilio .rest import Client
3
+
4
+ # Your Account Sid and Auth Token from twilio.com/console
5
+ account_sid = "ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX"
6
+ auth_token = "your_auth_token"
7
+ client = Client (account_sid , auth_token )
8
+
9
+ short_codes = client .messaging \
10
+ .services (sid = "MG2172dd2db502e20dd981ef0d67850e1a" ) \
11
+ .short_codes (sid = "SC3f94c94562ac88dccf16f8859a1a8b25" ) \
12
+ .fetch ()
13
+
14
+ print (short_codes .country_code )
Original file line number Diff line number Diff line change
1
+ # Download the Python helper library from twilio.com/docs/python/install
2
+ from twilio .rest import Client
3
+
4
+ # Your Account Sid and Auth Token from twilio.com/console
5
+ account_sid = "ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX"
6
+ auth_token = "your_auth_token"
7
+ client = Client (account_sid , auth_token )
8
+
9
+ short_codes = client .messaging \
10
+ .services (sid = "MG2172dd2db502e20dd981ef0d67850e1a" ) \
11
+ .short_codes \
12
+ .list ()
13
+
14
+ for short_code in short_codes :
15
+ print (short_code .sid )
Original file line number Diff line number Diff line change
1
+ # Download the Python helper library from twilio.com/docs/python/install
2
+ from twilio .rest import Client
3
+
4
+ # Your Account Sid and Auth Token from twilio.com/console
5
+ account_sid = "ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX"
6
+ auth_token = "your_auth_token"
7
+ client = Client (account_sid , auth_token )
8
+
9
+ service = client .messaging \
10
+ .services (sid = "MG2172dd2db502e20dd981ef0d67850e1a" ) \
11
+ .update (inbound_request_url = "http://www.example.com" )
12
+
13
+ print (service .inbound_request_url )
You can’t perform that action at this time.
0 commit comments