Creating the Data Source Name
This section describes how to edit the DSN configuration and then authenticate and connect to Twilio APIs.
DSN Configuration
You can use the Microsoft ODBC Data Source Administrator to edit the DSN configuration. Note that the installation process creates a both a user DSN and a system DSN, as described in Installing the Connector.
Note: The connector stores connection information in the Windows registry. To ensure that the connector can write to the registry, either run Power BI as an administrator or use a User DSN for your connection instead of a System DSN.
User DSN
Complete the following steps to edit the DSN configuration:
- Select Start > Search, and enter ODBC Data Sources in the Search box.
- Choose the version of the ODBC Administrator that corresponds to the bitness of your Power BI Desktop installation (32-bit or 64-bit).
- Select the system data source and click Configure.
- Edit the information on the Connection tab and click OK.
System DSN
Configure the system DSN the same way as the user DSN, except you will need to switch to the System DSN tab before performing Step 3.
If you're using Power BI's On-Premises Data Gateway with Standard mode, you must use the system DSN.
You must also specify a valid location for OAuthSettingsLocation (a path where OAuth credentials are locally stored to avoid repeated OAuth prompts).
This is because the Standard mode runs on service mode and can only access permitted locations, such as C:\Windows\ServiceProfiles\PBIEgwService\AppData\Local\Microsoft\On-premises data gateway.
Connecting to Twilio
You can authenticate to Twilio using either an Auth Token or an API key.Auth Token
You can authenticate to Twilio using an Auth Token and an Account SID.
Open the Twilio Console Dashboard, navigate to the Account Info section, and set these connection properties:
- AccountSID: the value of the Account SID field.
- AuthToken: the value of the Auth Token field. Click Show to unhide it.
API Key
To authenticate to Twilio using an API key:
- Open the Twilio Console Dashboard and click Account Info > API Keys > Go to API Keys. The API keys & tokens page opens.
- Click Create API key. The Create new API key menu opens.
- Set Friendly name to a name you want to use to refer to the token.
- Set Region to the region in which you want the API key to apply.
- Set Key type to your desired key type. The options include:
- Standard - Grants access to all Twilio API features except for managing API Keys, Account Configuration, and Subaccounts.
- Main - Grants access to the same features as the Standard key type, with the added ability to manage API Keys, Account Configuration, and Subaccounts.
- Restricted - Allows granular access to a subset of the Twilio API features that the standard APIKey grants. If you select this option, you must manually specify the permissions that the token grants.
- Click Create. This opens the Copy secret key page.
- Note the values of the SID and Secret fields. The latter is only shown once, so make sure you copy it before leaving this page.
- Set the following connection properties:
- AuthScheme: APIKey
- AccountSID: the value of the Account SID field in the Account Info section of the Twilio Console Dashboard.
- APIKeySID: the SID of the API key you generated earlier, which you noted in step 4.
- APIKeySecret: the API key secret of the API key you generated earlier, which you noted in step 4.
OAuth Client Authentication
To authenticate to Twilio using OAuthClient:
Twilio supports OAuth authentication using the Client Credentials grant flow. You must create a custom OAuth application, and define the required scopes. See Creating a Custom OAuth Application for more information.
To connect, set the following properties:
- AuthScheme: Set to OAuthClient to perform authentication using the Client Credentials grant type.
- OAuthClientId: Set this to the client Id assigned when you registered your application.
- OAuthClientSecret: Set this to the client secret assigned when you registered your application.