Create a session
This API lets you send OTPs via Plivo’s SMS or Voice services.
API Endpoint
Arguments
app_uuid string optional | The UUID of the application you want to use for this session. Defaults to UUID of the default application for your account. |
recipient string required | The phone number to which the message is to be delivered. |
channel string optional | The channel you want to use for sending the code. Allowed values: |
method string optional | The HTTP method to be used when calling the URL defined above. Allowed values: |
Url string optional | Set this parameter to the fully qualified URL to which status update callbacks for the session should be sent. Read more about the session attributes passed to this callback URL. |
locale string optional | Set this parameter to determine the language you want to use. Defaults to ‘en’. The This feature is available upon request only. Raise a support ticket and provide the translations you want to use. |
brand_namestring optional | This is the brand name that users will see in their Verify messages. It replaces the string “$“ in the Verify template of your choice. It is relevant to the ‘Voice’ and ‘SMS’ channels. Please note that passing a brand_name overrides the Brand Name configured in the Verify application. |
app_hashstring optional | Relevance: ‘SMS’ Channel and Android OS only This is the text string that the SMS Retriever API will look for to match the received SMS OTP to your android application. Please refer to Google’s documentation on how to compute your app’s hash string. The “app_hash” will be appended at the end of your verification SMS body. |
code_lengthinteger optional | Valid Values: 4 to 8 (inclusive) |
Returns
Returns a JSON response containing the API request ID and session UUID.