Table of Contents | ||||
---|---|---|---|---|
|
Purpose
This method is designed to verify that provided in the declaration request phone number is valid and is in service. Final stage
Specification
Link | |
Resource | /api/verifications/{{phone_number}}/actions/complete |
Scope | otp:write |
Components | |
Using Dictionaries | API paragraph not found |
Using Microservices | API paragraph not found |
Protocol type | REST |
Request type | PATCH |
Sync/Async | Sync |
Logic
API paragraph not found
Input parameters
Input parameter | Values | Type | Description | Example |
---|---|---|---|---|
phone_number | String | Required | +380508887700 |
Attributes
Attribute | Values | Type | Description | Example |
---|---|---|---|---|
code | Number | 3782 |
Filters
None
Request structure
Example
Expand | ||
---|---|---|
| ||
|
Authorize
Request to process the request using a token in the headers
Headers
Example
Expand | ||
---|---|---|
| ||
|
Validation data request
API paragraph not found
Processing
To confirm the verification, you must enter the phone number and OTP (one-time code) in the system
If the code entered by the user is correct, the system will send a reply: |
---|
|
Where:
id
- request idcode_expired_at
= the time until which the code is valid in the systemActive
- code activity status in the system"TRUE" -
if verification is possible:when creating a default query,
if there were less than 4 attempts to use
if the code has not expired (up to 300 seconds after creation)
"FALSE" - if verification is impossible:
if code has been already used
if more then 3 repayment attemptes has been made
if the verification deadline has expired, including successful verification
Status
- displays the verification status
|
|
|
|
|
---|---|---|---|---|
when creating a query, by default | upon successful completion | upon unsuccessful verification (more than 3 attempts) | the code has expired коду | installed by the provider, in case the SMS cannot be delivered |
...
Deactivate code
Invoke Send verification code
Return error
...
API paragraph not found
Global and configuration parameters
API paragraph not found
Input parameters
...
Input parameter
...
Values
...
Type
...
Description
...
Example
...
phone_number
(required)
...
String
...
+380508887700
Attributes
...
Attribute
...
Values
...
Type
...
Description
...
Example
...
code
...
Number
...
3782
Filters
None
Request structure
Example
Expand | ||
---|---|---|
| ||
|
Authorize
Request to process the request using a token in the headers
Headers
Example
Expand | ||
---|---|---|
| ||
|
Validate request (JSON schema)
API paragraph not found
Validation data request
API paragraph not found
Processing
Verify code
Search active code for phone number
Check code expiration period
Compare codes
Matched
Deactivate code
Add phone number to verified_phones
Not matched
Deactivate code
Invoke Send verification code
Return error
Response structure
Example:
Expand | ||
---|---|---|
| ||
|
Post-processing processes
API paragraph not found
HTTP status codes
HTTP status code | Message | What caused the error |
---|---|---|
200 | Response |
|
403 | Error |
Backward compatibility
API paragraph not found