Versions Compared

Key

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

OTP Verification

...

Link

eHealth MIS API · Apiary

Resource

/api/verifications

Scope

API paragraph not found

Components

OTP Verification serviceSMS

Using Dictionaries

API paragraph not found

Using Microservices

API paragraph not found

Protocol type

REST

Request type

POST

Sync/Async

Sync

Public/Private/Internal

Public

Logic

The user enters the phone number into the system.

...

Generate verification code

  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

Deactivate active verification code

  1. Search active verification code(s) for this phone number

    • If found - change status to INACTIVE

Save verification code

  1. Save generated verification code to DB

...

Preconditions

API paragraph not found

Global and configuration parameters

...

Input parameters

Attributes

Attribute

Values

Type

Description

Example

phone_number

(required)StringString

Required

+380508887700

Filters

None

Request structure

...

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'

Authorize

Request to process the request using a token in the headers

...

Expand
titleHeader example
Code Block

Content-Type: application/json
Authorization: Bearer c2778f3064753ea70de870a53795f5c9

Validate request (JSON schema)

API paragraph not found

Validation data request

API paragraph not found

...

HTTP status code

Message

What caused the error

200

Response

 

Backward compatibility

API paragraph not found