Skip to content

Commit

Permalink
Edited readme
Browse files Browse the repository at this point in the history
  • Loading branch information
jorge-beauregard committed Feb 2, 2021
1 parent b10b68c commit 71b8326
Showing 1 changed file with 12 additions and 3 deletions.
15 changes: 12 additions & 3 deletions sdk/communication/azure-communication-administration/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -26,17 +26,26 @@ import os
from azure.communication.administration import PhoneNumberAdministrationClient
from azure.identity import DefaultAzureCredential

connection_str = os.getenv('AZURE_COMMUNICATION_SERVICE_CONNECTION_STRING')
endpoint = os.getenv('AZURE_COMMUNICATION_SERVICE_ENDPOINT')

# To use Azure Active Directory Authentication (DefaultAzureCredential) make sure to have
# To use Azure Active Directory Authentication (DefaultAzureCredential) make sure to have your
# AZURE_TENANT_ID, AZURE_CLIENT_ID and AZURE_CLIENT_SECRET as env variables.
phone_number_administration_client = PhoneNumberAdministrationClient(endpoint, DefaultAzureCredential())

# You can also authenticate using your connection string
```
### Initializing Phone Number Client Using Connection String
Connection string authentication is also available for Phone Number Client.

```python
# You can find your endpoint and access token from your resource in the Azure Portal
import os
from azure.communication.administration import PhoneNumberAdministrationClient

connection_str = os.getenv('AZURE_COMMUNICATION_SERVICE_CONNECTION_STRING')
phone_number_administration_client = PhoneNumberAdministrationClient.from_connection_string(connection_str)

```

### Phone plans overview

Phone plans come in two types; Geographic and Toll-Free. Geographic phone plans are phone plans associated with a location, whose phone numbers' area codes are associated with the area code of a geographic location. Toll-Free phone plans are phone plans not associated location. For example, in the US, toll-free numbers can come with area codes such as 800 or 888.
Expand Down

0 comments on commit 71b8326

Please sign in to comment.