PingOne Platform APIs

Read One Phone Delivery Settings (include Verify templates)

 

GET {{apiPath}}/environments/{{envID}}/notificationsSettings/phoneDeliverySettings/{{twilioVerifyPhoneDeliverySettingsID}}?expand=twilioverifytemplates

This example uses GET {{apiPath}}/environments/{{envID}}/notificationsSettings/phoneDeliverySettings/{{twilioVerifyPhoneDeliverySettingsID}}?expand=twilioverifytemplates to retrieve the specified Twilio phone delivery settings.

By including the expand query parameter and setting it to twilioverifytemplates, this request specifies that the response should also include the relevant information for all of the Twilio Verify templates associated with the account. You’ll need this information when creating SMS/Voice notification content that uses a Verify template. Refer to the Create SMS Content (including Twilio Verify template) example.

Headers

Authorization      Bearer {{accessToken}}

Example Request

  • cURL

  • C#

  • Go

  • HTTP

  • Java

  • jQuery

  • NodeJS

  • Python

  • PHP

  • Ruby

  • Swift

curl --location --globoff '{{apiPath}}/environments/{{envID}}/notificationsSettings/phoneDeliverySettings/{{twilioVerifyPhoneDeliverySettingsID}}?expand=twilioverifytemplates' \
--header 'Authorization: Bearer {{accessToken}}'
var options = new RestClientOptions("{{apiPath}}/environments/{{envID}}/notificationsSettings/phoneDeliverySettings/{{twilioVerifyPhoneDeliverySettingsID}}?expand=twilioverifytemplates")
{
  MaxTimeout = -1,
};
var client = new RestClient(options);
var request = new RestRequest("", Method.Get);
request.AddHeader("Authorization", "Bearer {{accessToken}}");
RestResponse response = await client.ExecuteAsync(request);
Console.WriteLine(response.Content);
package main

import (
  "fmt"
  "net/http"
  "io"
)

func main() {

  url := "{{apiPath}}/environments/{{envID}}/notificationsSettings/phoneDeliverySettings/{{twilioVerifyPhoneDeliverySettingsID}}?expand=twilioverifytemplates"
  method := "GET"

  client := &http.Client {
  }
  req, err := http.NewRequest(method, url, nil)

  if err != nil {
    fmt.Println(err)
    return
  }
  req.Header.Add("Authorization", "Bearer {{accessToken}}")

  res, err := client.Do(req)
  if err != nil {
    fmt.Println(err)
    return
  }
  defer res.Body.Close()

  body, err := io.ReadAll(res.Body)
  if err != nil {
    fmt.Println(err)
    return
  }
  fmt.Println(string(body))
}
GET /environments/{{envID}}/notificationsSettings/phoneDeliverySettings/{{twilioVerifyPhoneDeliverySettingsID}}?expand=twilioverifytemplates HTTP/1.1
Host: {{apiPath}}
Authorization: Bearer {{accessToken}}
OkHttpClient client = new OkHttpClient().newBuilder()
  .build();
MediaType mediaType = MediaType.parse("text/plain");
RequestBody body = RequestBody.create(mediaType, "");
Request request = new Request.Builder()
  .url("{{apiPath}}/environments/{{envID}}/notificationsSettings/phoneDeliverySettings/{{twilioVerifyPhoneDeliverySettingsID}}?expand=twilioverifytemplates")
  .method("GET", body)
  .addHeader("Authorization", "Bearer {{accessToken}}")
  .build();
Response response = client.newCall(request).execute();
var settings = {
  "url": "{{apiPath}}/environments/{{envID}}/notificationsSettings/phoneDeliverySettings/{{twilioVerifyPhoneDeliverySettingsID}}?expand=twilioverifytemplates",
  "method": "GET",
  "timeout": 0,
  "headers": {
    "Authorization": "Bearer {{accessToken}}"
  },
};

$.ajax(settings).done(function (response) {
  console.log(response);
});
var request = require('request');
var options = {
  'method': 'GET',
  'url': '{{apiPath}}/environments/{{envID}}/notificationsSettings/phoneDeliverySettings/{{twilioVerifyPhoneDeliverySettingsID}}?expand=twilioverifytemplates',
  'headers': {
    'Authorization': 'Bearer {{accessToken}}'
  }
};
request(options, function (error, response) {
  if (error) throw new Error(error);
  console.log(response.body);
});
import requests

url = "{{apiPath}}/environments/{{envID}}/notificationsSettings/phoneDeliverySettings/{{twilioVerifyPhoneDeliverySettingsID}}?expand=twilioverifytemplates"

payload = {}
headers = {
  'Authorization': 'Bearer {{accessToken}}'
}

response = requests.request("GET", url, headers=headers, data=payload)

print(response.text)
<?php
require_once 'HTTP/Request2.php';
$request = new HTTP_Request2();
$request->setUrl('{{apiPath}}/environments/{{envID}}/notificationsSettings/phoneDeliverySettings/{{twilioVerifyPhoneDeliverySettingsID}}?expand=twilioverifytemplates');
$request->setMethod(HTTP_Request2::METHOD_GET);
$request->setConfig(array(
  'follow_redirects' => TRUE
));
$request->setHeader(array(
  'Authorization' => 'Bearer {{accessToken}}'
));
try {
  $response = $request->send();
  if ($response->getStatus() == 200) {
    echo $response->getBody();
  }
  else {
    echo 'Unexpected HTTP status: ' . $response->getStatus() . ' ' .
    $response->getReasonPhrase();
  }
}
catch(HTTP_Request2_Exception $e) {
  echo 'Error: ' . $e->getMessage();
}
require "uri"
require "net/http"

url = URI("{{apiPath}}/environments/{{envID}}/notificationsSettings/phoneDeliverySettings/{{twilioVerifyPhoneDeliverySettingsID}}?expand=twilioverifytemplates")

http = Net::HTTP.new(url.host, url.port);
request = Net::HTTP::Get.new(url)
request["Authorization"] = "Bearer {{accessToken}}"

response = http.request(request)
puts response.read_body
var request = URLRequest(url: URL(string: "{{apiPath}}/environments/{{envID}}/notificationsSettings/phoneDeliverySettings/{{twilioVerifyPhoneDeliverySettingsID}}?expand=twilioverifytemplates")!,timeoutInterval: Double.infinity)
request.addValue("Bearer {{accessToken}}", forHTTPHeaderField: "Authorization")

request.httpMethod = "GET"

let task = URLSession.shared.dataTask(with: request) { data, response, error in
  guard let data = data else {
    print(String(describing: error))
    return
  }
  print(String(data: data, encoding: .utf8)!)
}

task.resume()

Example Response

200 OK

{
    "_links": {
        "self": {
            "href": "https://api.pingone.eu/v1/environments/abfba8f6-49eb-49f5-a5d9-80ad5c98f9f6/notificationsSettings/phoneDeliverySettings/33824049-6044-47b8-9459-34fc6e81646c"
        },
        "environment": {
            "href": "https://api.pingone.eu/v1/environments/abfba8f6-49eb-49f5-a5d9-80ad5c98f9f6"
        }
    },
    "id": "33824049-6044-47b8-9459-34fc6e81646c",
    "environment": {
        "id": "abfba8f6-49eb-49f5-a5d9-80ad5c98f9f6"
    },
    "createdAt": "2025-04-23T16:38:23.360Z",
    "updatedAt": "2025-04-23T16:38:23.360Z",
    "provider": "CUSTOM_TWILIO_VERIFY",
    "sid": "ACfa05ea1a5590f04ad45ce5daffe5b115",
    "verifyServiceId": "VAd98eda43d5e422ef9ac5f7af766cd45e",
    "_embedded": {
        "twilioVerifyTemplates": [
            {
                "translations": [
                    {
                        "locale": "en"
                    },
                    {
                        "locale": "nl"
                    },
                    {
                        "locale": "th"
                    },
                    {
                        "locale": "af"
                    },
                    {
                        "locale": "hr"
                    },
                    {
                        "locale": "nb"
                    },
                    {
                        "locale": "de"
                    },
                    {
                        "locale": "ko"
                    },
                    {
                        "locale": "it"
                    },
                    {
                        "locale": "da"
                    },
                    {
                        "locale": "tl"
                    },
                    {
                        "locale": "ms"
                    },
                    {
                        "locale": "fi"
                    },
                    {
                        "locale": "hu"
                    },
                    {
                        "locale": "ja"
                    }
                ],
                "id": "HJd2847507a6104c1622eaccf1f949af7d",
                "deliveryMethods": [
                    "Voice",
                    "SMS"
                ],
                "displayName": "Base Verification Template 2 with expires",
                "variables": {
                    "otp": {
                        "required": true,
                        "requiredForDeliveryMethods": [
                            "Voice",
                            "SMS"
                        ]
                    }
                },
                "allowDynamicVariables": false
            },
            {
                "translations": [
                    {
                        "locale": "zh"
                    },
                    {
                        "locale": "en"
                    },
                    {
                        "locale": "nl"
                    },
                    {
                        "locale": "th"
                    },
                    {
                        "locale": "af"
                    },
                    {
                        "locale": "nb"
                    },
                    {
                        "locale": "de"
                    },
                    {
                        "locale": "ko"
                    },
                    {
                        "locale": "tl"
                    },
                    {
                        "locale": "da"
                    },
                    {
                        "locale": "zh-cn"
                    },
                    {
                        "locale": "ja"
                    },
                    {
                        "locale": "zh-hk"
                    },
                    {
                        "locale": "ms"
                    },
                    {
                        "locale": "fi"
                    },
                    {
                        "locale": "id"
                    }
                ],
                "id": "HJ3694769091271a301c5873c6849932b3",
                "deliveryMethods": [
                    "Voice",
                    "SMS"
                ],
                "displayName": "Base Verification Template 1 with expires",
                "variables": {
                    "otp": {
                        "required": true,
                        "requiredForDeliveryMethods": [
                            "Voice",
                            "SMS"
                        ]
                    }
                },
                "allowDynamicVariables": false
            },
            {
                "translations": [
                    {
                        "locale": "en"
                    },
                    {
                        "locale": "nl"
                    },
                    {
                        "locale": "af"
                    },
                    {
                        "locale": "nb"
                    },
                    {
                        "locale": "da"
                    },
                    {
                        "locale": "ms"
                    },
                    {
                        "locale": "fi"
                    }
                ],
                "id": "HJ152393dff43d3a2c1554ab0f28291dbe",
                "deliveryMethods": [
                    "Voice",
                    "SMS"
                ],
                "displayName": "Verify Template with addendums",
                "variables": {
                    "otp": {
                        "required": true,
                        "requiredForDeliveryMethods": [
                            "Voice",
                            "SMS"
                        ]
                    }
                },
                "allowDynamicVariables": false
            },
            {
                "translations": [
                    {
                        "locale": "en"
                    },
                    {
                        "locale": "zh"
                    },
                    {
                        "locale": "af"
                    },
                    {
                        "locale": "vi"
                    },
                    {
                        "locale": "ca"
                    },
                    {
                        "locale": "it"
                    },
                    {
                        "locale": "zh-hk"
                    },
                    {
                        "locale": "pt-br"
                    },
                    {
                        "locale": "cs"
                    },
                    {
                        "locale": "id"
                    },
                    {
                        "locale": "es"
                    },
                    {
                        "locale": "ru"
                    },
                    {
                        "locale": "nl"
                    },
                    {
                        "locale": "pt"
                    },
                    {
                        "locale": "nb"
                    },
                    {
                        "locale": "tr"
                    },
                    {
                        "locale": "zh-cn"
                    },
                    {
                        "locale": "tl"
                    },
                    {
                        "locale": "th"
                    },
                    {
                        "locale": "ro"
                    },
                    {
                        "locale": "pl"
                    },
                    {
                        "locale": "fr"
                    },
                    {
                        "locale": "hr"
                    },
                    {
                        "locale": "de"
                    },
                    {
                        "locale": "da"
                    },
                    {
                        "locale": "hi"
                    },
                    {
                        "locale": "fi"
                    },
                    {
                        "locale": "hu"
                    },
                    {
                        "locale": "ja"
                    },
                    {
                        "locale": "he"
                    },
                    {
                        "locale": "ko"
                    },
                    {
                        "locale": "ms"
                    }
                ],
                "id": "HJ4d9c5db569029bedab5b28ab79f4cc8d",
                "deliveryMethods": [
                    "Voice",
                    "SMS"
                ],
                "displayName": "Base Verification Template 1",
                "variables": {
                    "otp": {
                        "required": true,
                        "requiredForDeliveryMethods": [
                            "Voice",
                            "SMS"
                        ]
                    }
                },
                "allowDynamicVariables": false
            }
        ]
    }
}