Telephony Credentials: Types
We offer three different Telephony Credential types to authenticate your calls.
This article will show you how to configure each type of credential and explain their differences and the scenarios where each may be most appropriate for your business.
SIP Connection Credentials
1. Click Add SIP Connection at the Connection Tab in the Portal.
2. Enter the name you wish to have for your connection
3. Select Credentials as the Connection Type
A username and password will automatically be generated but you should change the credentials by clicking the "edit" button to the left. It is highly recommended that you choose a strong password.
4. Click Save & Finish Editing or your user details will not be saved
Note: Once your Credentials Connection is created, you can display the username and password by clicking the eye icon under the Auth Detail column.
Why use SIP Connection Credentials?
SIP Connection Credentials allow you to get set up with a one-stop authentication service for managing your calls. The intuitive portal setup helps users separate their call traffic and allows for easy integration with softphone clients such as Zoiper.
On-Demand Credentials are created programmatically via our RESTful API.
1. Gather your API key
If you have not done so, you will need to generate a V2 key here in the API Keys Section
Ensure, API V2 is selected in the horizontal menu bar.
Click "Create API key".
Copy the API key and save it somewhere safe.
2. Gather your Connection ID
This can be found in your Connection's settings on the portal.
You can also return a list of your SIP Connections programmatically using our RESTful API. More details can be found here.
3. POST the API request
curl -i -X POST \
-H 'Authorization: Bearer <YOUR_TOKEN_HERE>' \
-H 'Content-Type: application/json' \
For more information on setting up On-Demand Credentials, please see our Developer Docs.
Why use On-Demand Credentials?
On-Demand Credentials helps you onboard new customers or team members under your SIP connection, allowing you to separate each user with their own security credentials. This solution is perfect for users looking to integrate WebRTC into their own platforms so that your backend system can create outbound calls to each on demand generated credential.
Upmarket, a comprehensive sales platform, was able to get up and running with Telnyx in half the deployment time they expect.
For more details on this Customer Success Story, and others like it, please click here.
Are there limitations with on-demand credentials?
Yes, inbound calls directly to on-demand generated credential is not currently supported. The purpose for on demand generated credentials is purely for outbound calls.
The typical use case is a call center service. You have a programmable voice application associated with a number. When a call is received to that number, you see which agents are logged in with the on demand generated credentials and your call center service would use our call control API to dial each of the generated credentials to connect the caller with one of the available agents. These agents are typically using a WebRTC client that they use to log in with the on demand credentials you generated for them. Once they're logged in, you'd want to make sure your WebRTC client can inform your call center backend that the agents are registered so the backend has a list of agents it can dial each time an inbound call is received to the main number.
JSON Web Tokens
JSON Web Tokens or JWTs can be created programmatically using our RESTful API.
These tokens are temporary and will expire after 24 hours.
To do this, you will first need to generate an On-Demand Credential, please see the setup tutorial above.
1. Gather your Credential ID
This will have been provided in the API response to your On-Demand Credential creation.
If you have yet to create an On-Demand Credential please see the setup tutorial above.
2. POST the API request
The following steps will assume the use of the API platform Postman, as before, but you can use whichever service you would like!
In the Postman "Headers", set your "Authorization" to the API v2 secret key and the Key should be preceded with "Bearer".
The "body" field can be left blank.
POST to https://api.telnyx.com/v2/telephony_credentials/<credential_id>/token making sure to replace <credential_id> with your generated Credential ID.
For more information on setting up JSON Web Tokens, please see our Developer Docs.
Note: The response body to your API request will be the JSON Web Token which will expire 24 hours after creation
Why use JSON Web Tokens?
JWTs provide much the same functionality as On-Demand Credentials while also providing additional security thanks to its default expiry time. This allows you to provide temporary access to onboarding users or guests while still giving them access to WebRTC and VoIP with Telnyx.
Authenticate and Place a Test Call
After all that work you may be looking for a quick and easy way to test and verify that everything is working properly with your Telephony Credentials.
Luckily, Telnyx has you covered!
If you are testing using your SIP Connection Credentials or On-Demand Credentials, simply set your Authentication to "Credential" and enter your credential information as below:
If you are testing using your JSON Web Token, set your Authentication to "Token" and enter your token under "Login Token" as below: