Skip to main content
POST
/
verifications
/
flashcall
JavaScript
import Telnyx from 'telnyx';

const client = new Telnyx({
  apiKey: process.env['TELNYX_API_KEY'], // This is the default and can be omitted
});

const createVerificationResponse = await client.verifications.triggerFlashcall({
  phone_number: '+13035551234',
  verify_profile_id: '12ade33a-21c0-473b-b055-b3c836e1c292',
});

console.log(createVerificationResponse.data);
import os
from telnyx import Telnyx

client = Telnyx(
api_key=os.environ.get("TELNYX_API_KEY"), # This is the default and can be omitted
)
create_verification_response = client.verifications.trigger_flashcall(
phone_number="+13035551234",
verify_profile_id="12ade33a-21c0-473b-b055-b3c836e1c292",
)
print(create_verification_response.data)
package main

import (
"context"
"fmt"

"github.com/team-telnyx/telnyx-go"
"github.com/team-telnyx/telnyx-go/option"
)

func main() {
client := telnyx.NewClient(
option.WithAPIKey("My API Key"),
)
createVerificationResponse, err := client.Verifications.TriggerFlashcall(context.TODO(), telnyx.VerificationTriggerFlashcallParams{
PhoneNumber: "+13035551234",
VerifyProfileID: "12ade33a-21c0-473b-b055-b3c836e1c292",
})
if err != nil {
panic(err.Error())
}
fmt.Printf("%+v\n", createVerificationResponse.Data)
}
package com.telnyx.sdk.example;

import com.telnyx.sdk.client.TelnyxClient;
import com.telnyx.sdk.client.okhttp.TelnyxOkHttpClient;
import com.telnyx.sdk.models.verifications.CreateVerificationResponse;
import com.telnyx.sdk.models.verifications.VerificationTriggerFlashcallParams;

public final class Main {
private Main() {}

public static void main(String[] args) {
TelnyxClient client = TelnyxOkHttpClient.fromEnv();

VerificationTriggerFlashcallParams params = VerificationTriggerFlashcallParams.builder()
.phoneNumber("+13035551234")
.verifyProfileId("12ade33a-21c0-473b-b055-b3c836e1c292")
.build();
CreateVerificationResponse createVerificationResponse = client.verifications().triggerFlashcall(params);
}
}
require "telnyx"

telnyx = Telnyx::Client.new(api_key: "My API Key")

create_verification_response = telnyx.verifications.trigger_flashcall(
phone_number: "+13035551234",
verify_profile_id: "12ade33a-21c0-473b-b055-b3c836e1c292"
)

puts(create_verification_response)
<?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 {
$createVerificationResponse = $client->verifications->triggerFlashcall(
phoneNumber: '+13035551234',
verifyProfileID: '12ade33a-21c0-473b-b055-b3c836e1c292',
timeoutSecs: 300,
);

var_dump($createVerificationResponse);
} catch (APIException $e) {
echo $e->getMessage();
}
telnyx verifications trigger-flashcall \
--api-key 'My API Key' \
--phone-number +13035551234 \
--verify-profile-id 12ade33a-21c0-473b-b055-b3c836e1c292
curl --request POST \
--url https://api.telnyx.com/v2/verifications/flashcall \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"phone_number": "+13035551234",
"verify_profile_id": "12ade33a-21c0-473b-b055-b3c836e1c292",
"timeout_secs": 300
}
'
{
  "data": {
    "id": "12ade33a-21c0-473b-b055-b3c836e1c292",
    "type": "flashcall",
    "record_type": "verification",
    "phone_number": "+13035551234",
    "verify_profile_id": "12ade33a-21c0-473b-b055-b3c836e1c292",
    "timeout_secs": 300,
    "status": "pending",
    "created_at": "2020-09-14T17:03:32.965812",
    "updated_at": "2020-09-14T17:03:32.965812"
  }
}
{
"errors": [
{
"code": "10015",
"title": "Invalid sorting value",
"detail": "The value provided for sorting is not valid. Check the value used and try again.",
"source": {
"pointer": "/sort",
"parameter": "<string>"
},
"meta": {
"url": "https://developers.telnyx.com/docs/overview/errors/10015"
}
}
]
}

Authorizations

Authorization
string
header
required

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Body

application/json

The request body when creating a verification.

phone_number
string
required

+E164 formatted phone number.

Example:

"+13035551234"

verify_profile_id
string<uuid>
required

The identifier of the associated Verify profile.

Example:

"12ade33a-21c0-473b-b055-b3c836e1c292"

timeout_secs
integer

The number of seconds the verification code is valid for.

Example:

300

Response

Expected verifications response to a valid request.

data
Verification · object
required