Phone Delivery Settings
The phone delivery settings endpoints provide the ability to configure different accounts which could be used for sending an SMS or voice message. They implement operations to create, update, read and delete phone delivery settings resources for an environment.
|
Phone delivery settings properties
| Property | Type | Required? | Mutable? | Description |
|---|---|---|---|---|
|
Date |
N/A |
Read-only |
The time the resource was created. |
|
String |
Required |
Immutable |
The relationship of the phone delivery settings to the environment. |
|
String |
Required |
Immutable |
The auto-generated ID of the phone delivery settings. |
|
String |
Required |
Immutable |
The provider to use for phone delivery service. Possible values: * * * * |
|
Date |
N/A |
Read-only |
The time the resource was last updated. |
Custom provider phone delivery settings properties (Twilio or Syniverse)
The phoneDeliverySettings instance that supports your Twilio or Syniverse custom provider phone delivery accounts.
| Property | Type | Required? | Mutable? | Description |
|---|---|---|---|---|
|
String |
Required |
Immutable |
The secret key of the Twilio or Syniverse account. |
|
Date |
N/A |
Read-only |
The time the resource was created. |
|
String |
Required |
Immutable |
The relationship of the phone delivery settings to the environment. |
|
String |
Required |
Immutable |
The auto-generated ID of the phone delivery settings. |
|
String |
Optional |
Mutable |
The name you want to use for the provider. |
|
Array |
Required |
Mutable |
A collection of Twilio or Syniverse numbers to use when sending a notification. The array uses the properties in the Custom provider phone number properties data model. If left blank, returns the numbers from the Twilio or Syniverse service. |
|
String |
Required |
Immutable |
The ID of the provider of phone delivery service. In this case it has the value |
|
String |
Required |
Immutable |
The public ID of the Twilio account. |
|
Date |
N/A |
Read-only |
The time the resource was last updated. |
|
String |
Optional |
Mutable |
The Twilio Verify service ID. Required when you are using Twilio Verify. |
Custom provider phone delivery settings properties (excluding Twilio and Syniverse)
The phoneDeliverySettings instance that supports your custom provider phone delivery accounts (excluding Twilio and Syniverse).
| Property | Type | Required? | Mutable? | Description |
|---|---|---|---|---|
|
Object |
Required |
Mutable |
Contains the information for authenticating with the provider. |
|
String |
Required |
Mutable |
The authentication token for the custom provider account. |
|
String |
Required |
Mutable |
The URL of the authorization server that provides the access token. |
|
String |
N/A |
Read-only |
The method used for sending the client ID and secret. Returned in responses for custom providers that require OAuth 2 authentication. Currently, value returned is always |
|
String |
Required |
Mutable |
The client’s public identifier. |
|
String |
Required |
Mutable |
The client’s secret. |
|
String |
N/A |
Read-only |
The grant type used. Returned in responses for custom providers that require OAuth 2 authentication. Currently, value returned is always |
|
String |
Required |
Mutable |
The name of the custom header used for authentication. |
|
String |
Required |
Mutable |
The value to use for the custom header used for authentication. |
|
String |
Required |
Mutable |
The custom provider account’s authentication method. Possible values: * BASIC - username/password * BEARER - bearer token * OAUTH2 - OAuth 2 * CUSTOM_HEADER - authentication using a custom header |
|
String |
Required |
Mutable |
The password for the custom provider account. |
|
String |
Required |
Mutable |
The username for the custom provider account. |
|
String |
Required |
Mutable |
The customer provider’s name. |
|
Array |
Required |
Mutable |
A collection of Twilio or Syniverse numbers to use when sending a notification. The array uses the properties in the Custom provider phone number properties data model. |
|
String |
Optional |
Mutable |
For voice OTP notifications only. |
|
String |
Optional |
Mutable |
For voice OTP notifications only. |
|
String |
Optional |
Mutable |
The notification’s request body. This property is required when * * * * * * You can also use dynamic variables in the body. For more information, refer to Dynamic variables. |
|
String |
Required |
Mutable |
The notification’s delivery method. Possible value: * * |
|
String[] |
Optional |
Mutable |
The notification’s request header, matching the format of the request body. When the * Form * JSON Otherwise, custom header values are also allowed. |
|
String |
Required |
Mutable |
The type of HTTP request method. Possible values: * * |
|
String |
Required |
Mutable |
The phone number format. Possible values: * * NUMBER_ONLY |
|
String |
Required |
Mutable |
The provider’s remote gateway or customer gateway URL. * For requests using the * For requests using the |
|
We add a |
Custom provider phone number properties
| Property | Type | Required? | Mutable? | Description |
|---|---|---|---|---|
|
Boolean |
Required |
Mutable |
Specifies whether the number is currently available in the provider account. |
|
String[] |
Required |
Mutable |
A collection of the phone delivery service capabilities. Possible values: |
|
Date |
N/A |
Read-only |
The time the resource was created. |
|
String |
Required |
Mutable |
The phone number, toll-free number or short code. |
|
Boolean |
Required |
Mutable |
Specifies whether the number is selected by the admin for sending messages. |
|
String[] |
Required |
Mutable |
Specifies the * * * If an SMS template has an alphanumeric |
|
String |
Required |
Mutable |
The type of phone number. Possible values: |
Phone delivery events generated
Refer to Audit Reporting Events for the events generated.
Phone delivery settings response codes
| Code | Message |
|---|---|
200 |
Successful operation. |
201 |
Successfully created. |
400 |
The request could not be completed. |
401 |
You do not have access to this resource. |
403 |
You do not have permissions or are not licensed to make this request. |
404 |
The requested resource was not found. |
Configure your custom phone delivery vendor account (Twilio or Syniverse)
-
Create a custom Twilio or Syniverse phone delivery settings resource using the
POST {{apiPath}}/environments/{{envID}}/notificationsSettings/phoneDeliverySettingsoperation. Twilio:{ "sid": "someSid", "authToken": "someAuthToken", "provider": "CUSTOM_TWILIO" }For Syniverse, remove the
sidproperty in the above example, and set"provider": "CUSTOM_SYNIVERSE". -
Use the PUT {{apiPath}}/environments/{{envID}}/notificationsSettings/phoneDeliverySettings/{{phoneDeliverySettingID}} to select the numbers you would like to use for sending messages, by marking them as
selected. The Twilio example is as follows:{ "id": "someTwilioPhoneDeliverySettingsId", "sid": "someSid", "provider": "CUSTOM_TWILIO", "numbers": [ { "type": "SHORT_CODE", "capabilities": [ "SMS" ], "selected": true, "available": true, "number": "894546" }, { "type": "TOLL_FREE", "capabilities": [ "SMS" ], "selected": false, "available": true, "number": "+18544440098" }, { "type": "PHONE_NUMBER", "capabilities": [ "SMS", "VOICE" ], "selected": true, "available": true, "number": "+172544440091" } ] }For Syniverse, remove the
sidproperty in the above example, and set"provider": "CUSTOM_SYNIVERSE".
The sequence of SMS/Voice providers in the notification settings resource’s smsProvidersFallbackChain comprises the notification fallback sequence, in the event of a primary or subsequent provider failing to send a notification.
Refer to Notifications Settings for details on configuring an SMS/Voice provider fallback chain.
Configure your custom phone delivery vendor account (excluding Twilio and Syniverse)
Create a custom phone delivery settings resource using the POST {{apiPath}}/environments/{{envID}}/notificationsSettings/phoneDeliverySettings operation.
Create phone delivery settings:
--header 'Content-Type: application/json' \
--header 'Authorization: Bearer <insert access token>' \
--data-raw '{
"name": "Custom Provider Name",
"provider":"CUSTOM_PROVIDER",
"authentication":{
"method":"BASIC",
"username":"<username>",
"password":"<password>"
},
"requests":[{
"deliveryMethod":"SMS",
"url":"<Custom provider API URL>",
"method":"POST",
"body":"messageType=ARN&message=${message}&phoneNumber=${to}&sender=${from}"
}],
"numbers":[{"type":"PHONE_NUMBER","number":"+1 222 333","capabilities":["SMS"]}]
}
|
The following is relevant only if the provided URL is a gateway API implemented by a customer. If the URL is the provider’s remote gateway URL, it is not applicable. |
After the admin has updated the provider configuration, PingOne will send the following POST request to your gateway every time a user signs up, logs in, adds a new device, or issues another SMS or voice notification:
curl --request POST '<Custom provider API URL>' \
--header 'content-type: application/json' \
--header 'Authorization: Basic QUN...YQ==' \
--data-raw '{
"message": "<notification message>",
"to": "<user phone number>",
"from": "<sender phone number>"
}'