REST API

Note

You need token to access REST API. Receiving a token is described in tab with additional information.


OTPSender API

This provides API for delivering one-time passwords to the user.

Module information

Detailed information about module.

GET
/v1/info
Getting detailed information about module.
Request
Request example:
curl -X GET -H "X-Auth-Token: $token" http://controller:9367/v1/info | python -m json.tool
Response
Response parameters:
Name In Type Description
version body string Module version number.

Example of getting information about module in JSON format:

{
    "info": {
        "version": "1.3"
    }
}

One-time passwords

API for working with one-time passwords.

POST
/v1/otp/send
Sending one-time password.
Request
Request parameters:
Name In Type Description
user_id body string User ID.
method body string One-time password delivery method. Valid values are telegram, email.
Request example:
curl -X POST -H "X-Auth-Token: $token" -H "Content-Type: application/json" -d '{"user_id": "4624d46153f04fdb963a16754f8b5d0a", "method": "telegram"}' http://controller:9367/v1/otp/send

This operation has no response content.

Detailed description of response codes for requests is available in the tab with additional information.