Verify Brand SMS OTP
Verify the SMS OTP (One-Time Password) for Sole Proprietor brand verification.
Verification Flow:
- User receives OTP via SMS after triggering
- User submits the OTP pin through this endpoint
- Upon successful verification:
- A
BRAND_OTP_VERIFIEDwebhook event is sent to the CSP - The brand’s
identityStatuschanges toVERIFIED - Campaigns can now be created for this brand
- A
Error Handling:
Provides proper error responses for:
- Invalid OTP pins
- Expired OTPs
- OTP verification failures
PUT
/
10dlc
/
brand
/
{brandId}
/
smsOtp
JavaScript
import Telnyx from 'telnyx';
const client = new Telnyx({
apiKey: process.env['TELNYX_API_KEY'], // This is the default and can be omitted
});
await client.messaging10dlc.brand.verifySMSOtp('4b20019b-043a-78f8-0657-b3be3f4b4002', {
otpPin: '123456',
});import os
from telnyx import Telnyx
client = Telnyx(
api_key=os.environ.get("TELNYX_API_KEY"), # This is the default and can be omitted
)
client.messaging_10dlc.brand.verify_sms_otp(
brand_id="4b20019b-043a-78f8-0657-b3be3f4b4002",
otp_pin="123456",
)
package main
import (
"context"
"github.com/team-telnyx/telnyx-go"
"github.com/team-telnyx/telnyx-go/option"
)
func main() {
client := telnyx.NewClient(
option.WithAPIKey("My API Key"),
)
err := client.Messaging10dlc.Brand.VerifySMSOtp(
context.TODO(),
"4b20019b-043a-78f8-0657-b3be3f4b4002",
telnyx.Messaging10dlcBrandVerifySMSOtpParams{
OtpPin: "123456",
},
)
if err != nil {
panic(err.Error())
}
}
package com.telnyx.sdk.example;
import com.telnyx.sdk.client.TelnyxClient;
import com.telnyx.sdk.client.okhttp.TelnyxOkHttpClient;
import com.telnyx.sdk.models.messaging10dlc.brand.BrandVerifySmsOtpParams;
public final class Main {
private Main() {}
public static void main(String[] args) {
TelnyxClient client = TelnyxOkHttpClient.fromEnv();
BrandVerifySmsOtpParams params = BrandVerifySmsOtpParams.builder()
.brandId("4b20019b-043a-78f8-0657-b3be3f4b4002")
.otpPin("123456")
.build();
client.messaging10dlc().brand().verifySmsOtp(params);
}
}require "telnyx"
telnyx = Telnyx::Client.new(api_key: "My API Key")
result = telnyx.messaging_10dlc.brand.verify_sms_otp("4b20019b-043a-78f8-0657-b3be3f4b4002", otp_pin: "123456")
puts(result)<?php
require_once dirname(__DIR__) . '/vendor/autoload.php';
use Telnyx\Client;
use Telnyx\Core\Exceptions\APIException;
$client = new Client(apiKey: getenv('TELNYX_API_KEY') ?: 'My API Key');
try {
$result = $client->messaging10dlc->brand->verifySMSOtp(
'4b20019b-043a-78f8-0657-b3be3f4b4002', otpPin: '123456'
);
var_dump($result);
} catch (APIException $e) {
echo $e->getMessage();
}telnyx messaging-10dlc:brand verify-sms-otp \
--api-key 'My API Key' \
--brand-id 4b20019b-043a-78f8-0657-b3be3f4b4002 \
--otp-pin 123456curl --request PUT \
--url https://api.telnyx.com/v2/10dlc/brand/{brandId}/smsOtp \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"otpPin": "123456"
}
'{
"detail": [
{
"loc": [
"string"
],
"msg": "Message",
"type": "Error Type"
}
]
}{
"detail": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>"
}
]
}{
"errors": [
{
"code": "string",
"title": "string",
"detail": "string",
"source": {
"pointer": "string",
"parameter": "string"
}
}
]
}Authorizations
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Path Parameters
The Brand ID for which to verify the OTP
Example:
"4b20019b-043a-78f8-0657-b3be3f4b4002"
Body
application/json
Request body for verifying a Brand SMS OTP
The OTP PIN received via SMS
Required string length:
4 - 10Example:
"123456"
Response
OTP verified successfully - No content returned
Was this page helpful?
⌘I
JavaScript
import Telnyx from 'telnyx';
const client = new Telnyx({
apiKey: process.env['TELNYX_API_KEY'], // This is the default and can be omitted
});
await client.messaging10dlc.brand.verifySMSOtp('4b20019b-043a-78f8-0657-b3be3f4b4002', {
otpPin: '123456',
});import os
from telnyx import Telnyx
client = Telnyx(
api_key=os.environ.get("TELNYX_API_KEY"), # This is the default and can be omitted
)
client.messaging_10dlc.brand.verify_sms_otp(
brand_id="4b20019b-043a-78f8-0657-b3be3f4b4002",
otp_pin="123456",
)
package main
import (
"context"
"github.com/team-telnyx/telnyx-go"
"github.com/team-telnyx/telnyx-go/option"
)
func main() {
client := telnyx.NewClient(
option.WithAPIKey("My API Key"),
)
err := client.Messaging10dlc.Brand.VerifySMSOtp(
context.TODO(),
"4b20019b-043a-78f8-0657-b3be3f4b4002",
telnyx.Messaging10dlcBrandVerifySMSOtpParams{
OtpPin: "123456",
},
)
if err != nil {
panic(err.Error())
}
}
package com.telnyx.sdk.example;
import com.telnyx.sdk.client.TelnyxClient;
import com.telnyx.sdk.client.okhttp.TelnyxOkHttpClient;
import com.telnyx.sdk.models.messaging10dlc.brand.BrandVerifySmsOtpParams;
public final class Main {
private Main() {}
public static void main(String[] args) {
TelnyxClient client = TelnyxOkHttpClient.fromEnv();
BrandVerifySmsOtpParams params = BrandVerifySmsOtpParams.builder()
.brandId("4b20019b-043a-78f8-0657-b3be3f4b4002")
.otpPin("123456")
.build();
client.messaging10dlc().brand().verifySmsOtp(params);
}
}require "telnyx"
telnyx = Telnyx::Client.new(api_key: "My API Key")
result = telnyx.messaging_10dlc.brand.verify_sms_otp("4b20019b-043a-78f8-0657-b3be3f4b4002", otp_pin: "123456")
puts(result)<?php
require_once dirname(__DIR__) . '/vendor/autoload.php';
use Telnyx\Client;
use Telnyx\Core\Exceptions\APIException;
$client = new Client(apiKey: getenv('TELNYX_API_KEY') ?: 'My API Key');
try {
$result = $client->messaging10dlc->brand->verifySMSOtp(
'4b20019b-043a-78f8-0657-b3be3f4b4002', otpPin: '123456'
);
var_dump($result);
} catch (APIException $e) {
echo $e->getMessage();
}telnyx messaging-10dlc:brand verify-sms-otp \
--api-key 'My API Key' \
--brand-id 4b20019b-043a-78f8-0657-b3be3f4b4002 \
--otp-pin 123456curl --request PUT \
--url https://api.telnyx.com/v2/10dlc/brand/{brandId}/smsOtp \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"otpPin": "123456"
}
'{
"detail": [
{
"loc": [
"string"
],
"msg": "Message",
"type": "Error Type"
}
]
}{
"detail": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>"
}
]
}{
"errors": [
{
"code": "string",
"title": "string",
"detail": "string",
"source": {
"pointer": "string",
"parameter": "string"
}
}
]
}