Retrieve a Phone Validation
Endpointβ
GET https://api.verifik.co/v2/phone-validations/{id}
This service retrieves a specific phone validation record using its unique identifier. The response includes all the details about the phone validation process, including status, OTP information, and associated project data. This endpoint is useful for checking the current status of a phone validation or retrieving details for audit purposes.
Headersβ
Content-Typeβ
Type: String
Required: Required
Value: application/json
Authorizationβ
Type: String
Required: Required
Value: Bearer {YOUR_ACCESS_TOKEN}
Path Parametersβ
idβ
Type: String
Required: Yes
The unique identifier of the Phone Validation you want to retrieve.
Query Parametersβ
populates[]β
Type: String
Required: No
Optional. A list of related objects to include in the response. Available options: client, project, projectFlow.
Requestβ
- Node.js
- Python
- PHP
- Go
import axios from 'axios';
const options = {
method: 'GET',
url: 'https://api.verifik.co/v2/phone-validations/phone_validation_123456789',
params: {
'populates[]': ['client', 'project', 'projectFlow']
},
headers: {
'Content-Type': 'application/json',
'Authorization': 'Bearer <your_token>'
}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
import http.client
conn = http.client.HTTPSConnection("api.verifik.co")
headers = {
'Content-Type': 'application/json',
'Authorization': 'Bearer <your_token>'
}
conn.request("GET", "/v2/phone-validations/phone_validation_123456789?populates[]=client&populates[]=project&populates[]=projectFlow", headers=headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
<?php
$client = new \GuzzleHttp\Client();
$response = $client->request('GET', 'https://api.verifik.co/v2/phone-validations/phone_validation_123456789', [
'headers' => [
'Content-Type' => 'application/json',
'Authorization' => 'Bearer <your_token>',
],
'query' => [
'populates[]' => ['client', 'project', 'projectFlow']
]
]);
echo $response->getBody();
package main
import (
"fmt"
"io"
"net/http"
)
func main() {
url := "https://api.verifik.co/v2/phone-validations/phone_validation_123456789?populates[]=client&populates[]=project&populates[]=projectFlow"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Content-Type", "application/json")
req.Header.Add("Authorization", "Bearer <your_token>")
client := &http.Client{}
res, _ := client.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}
Responseβ
- 200
- 404
{
"success": true,
"data": {
"_id": "phone_validation_123456789",
"client": {
"_id": "client_123456789",
"name": "Example Client",
"email": "client@example.com"
},
"project": {
"_id": "project_123456789",
"name": "Example Project",
"description": "Example project description"
},
"projectFlow": {
"_id": "flow_123456789",
"name": "Example Flow",
"type": "onboarding"
},
"status": "validated",
"countryCode": "+1",
"phone": "1234567890",
"type": "validation",
"validationMethod": "verificationCode",
"verificationCode": "123456",
"expiresAt": "2024-01-15T11:30:00Z",
"redirectUrl": "https://example.com/success",
"webhookUrl": "https://example.com/webhook",
"requires2FA": false,
"ipAddress": "192.168.1.1",
"attempts": 1,
"maxAttempts": 3,
"createdAt": "2024-01-15T10:30:00Z",
"updatedAt": "2024-01-15T10:32:00Z",
"validatedAt": "2024-01-15T10:32:00Z"
},
"signature": {
"dateTime": "April 11, 2023 12:25 PM",
"message": "Certified by Verifik.co"
}
}
{
"success": false,
"error": "Phone validation not found",
"code": "PHONE_VALIDATION_NOT_FOUND"
}
Featuresβ
- Retrieval by ID: Get a specific phone validation using its unique ID
- Complete Information: Includes all details of the validation process
- Related Data: Client, project and project flow information
- Detailed Status: Current status, attempts, limits and timestamps
- Configuration: Redirect URLs, webhooks and security configurations
- Country Codes: Complete country code and number information
- Multiple Languages: Support for JavaScript, Python, PHP and Swift
- Error Handling: Detailed error responses for different scenarios