Retrieve a Phone Validation

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

Name
Value

Content-Type

application/json

Authorization

Bearer {YOUR_ACCESS_TOKEN}

Path Parameters

Name
Type
Description

id

string

The unique identifier of the Phone Validation you want to retrieve.

Query Parameters

Name
Type
Description

populates[]

string

Optional. A list of related objects to include in the response. Available options: client, project, projectFlow.

Request Examples

curl -X GET https://api.verifik.co/v2/phone-validations/674de8df21c72be3cc42b8a7 \
  -H "Authorization: Bearer YOUR_ACCESS_TOKEN" \
  -H "Content-Type: application/json"

Response

The response will contain detailed information about the requested Phone Validation, including its current status, OTP details, and associated project information.

{
  "data": {
    "_id": "674de8df21c72be3cc42b8a7",
    "client": "507f1f77bcf86cd799439013",
    "project": "507f1f77bcf86cd799439011",
    "projectFlow": "507f1f77bcf86cd799439015",
    "status": "sent",
    "countryCode": "+507",
    "phone": "62647737",
    "phoneGateway": "whatsapp",
    "otp": "$2a$10$/v55.1QmwlCdX6zD1jy51OF87POIDZzj30.UmTtp13pZv6uKm.a.m",
    "expiresAt": "2024-12-02T17:15:35.000Z",
    "name": "John Doe",
    "phoneData": {
      "title": "Verifik Client"
    },
    "extraParams": {},
    "type": "validation",
    "redirectUrl": "https://api.verifik.co",
    "webhookUrl": "https://yourapp.com/webhook",
    "requires2FA": false,
    "ipAddress": "172.17.0.1",
    "language": "en",
    "createdAt": "2024-12-02T17:05:36.788Z",
    "updatedAt": "2024-12-02T17:05:36.788Z",
    "__v": 0
  }
}

Notes

  • Access Control: This endpoint respects client-based access control. Users can only retrieve phone validations associated with their client account.

  • Data Population: By default, related objects (client, project, projectFlow) are populated to provide comprehensive information.

  • Security: The OTP field is encrypted and cannot be used directly for validation purposes.

  • Status Tracking: Use this endpoint to monitor the progress of phone validations through their lifecycle.

  • Audit Trail: The createdAt and updatedAt fields provide a complete audit trail of the validation process.

Common Use Cases

  • Status Checking: Verify the current status of a phone validation (sent, validated, failed, expired).

  • Audit Purposes: Retrieve complete information about a phone validation for compliance or debugging.

  • Integration: Use the populated project and projectFlow data to understand the validation context.

  • Monitoring: Track phone validation success rates and identify potential issues in your verification flow.

Last updated

Was this helpful?