Skip to main content

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​

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);
}

Response​

{
"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"
}
}

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