Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

...

...

...

...

...

...

OTP Verification

Purpose

This method is designed to verify that provided in the declaration request phone number is valid and is in service. Initialization phase

...

Link

eHealth MIS API · Apiary

Resource

/api/verifications

Scope

API paragraph not found

Components

OTP Verification service

Using Dictionaries

API paragraph not found

Using Microservices

API paragraph not found

Protocol type

REST

Request type

POST

Sync/Async

Sync

...

  1. Generate verification code using basic random (default) function or time-based algorithm

    • Verification code format - digits only ^[1-9][0-9]*$

    • Verification code length - configuration parameter (default = 4)

    • Verification code expiration period - configuration parameter (default = 15 min)

    • Set expiration period using configuration parameter

...

Filters

None

Request structure

See on Apiary

Example

Expand
titleRequest example
Code Block
curl --include \
     --request POST \
     --header "Content-Type: application/json" \
     --header "Authorization: Bearer c2778f3064753ea70de870a53795f5c9" \
     --data-binary "{
  \"phone_number\": \"+380508887700\"
}" \
'http://ehealth.com/api/verifications'

...

API paragraph not found

Response structure

See on Apiary

Example:

Expand
titleResponse example
Code Block
{
  "meta": {
    "code": 200,
    "url": "https://example.com/resource",
    "type": "object",
    "request_id": "req-adasdoijasdojsda"
  },
  "data": {
    "id": "7d23bebb-1cf3-4221-bf21-18aada444756",
    "status": "NEW",
    "code_expired_at": "2017-07-10T12:20:16.300597Z",
    "active": true
  }
}

...