Technical description of the platform

REST API: authorization service methods

https://img.shields.io/badge/auth-required-orange.svg

GET ​/status

The method is used for obtaining of the authorization service status.

Example of the service response:

POST ​/v1​/user

The method is used for registration of a new user via the authorization service.

The method query contains following data:

  • login – user login (e-mail address);

  • password – account password;

  • locale – e-mail notifications language (possible variants: en and ru);

  • source – user type:

If the registration has been carried out successful, the method returns the 201 code. In case of another response, a user has not been registered.

GET ​/v1​/user​/profile

The method is used for obtaining of user data.

Example of the service response:

POST ​/v1​/user​/address

The method is used for obtaining of a user address identifier. The method query contains following data:

  • address – user blockchain address;

  • name – user name.

Example of the service response:

GET /v1​/user​/address​/exists

The method is used for checking of a user e-mail address. The method query contains a user e-mail address.

Example of the service response:

POST ​/v1​/user​/password​/restore

The method is used for restoring of an account password.

The method query contains following data:

  • email – user e-mail;

  • source – user type:

    Example of the service response:

POST ​/v1​/user​/password​/reset

The method is used for user password reset.

The method query contains following data:

  • token – user authorization token;

  • password – current user password.

Example of the service response:

GET ​/v1​/user​/confirm​/{code}

The method is used for confirmation of a password restoring code for a user account. The method query contains a confirmation code value.

POST ​/v1​/user​/resendEmail

The method is used for resending of a password recovery code to a specified e-mail.

The method query contains following data:

The method response returns a user e-mail, to which a restoring code was sent.

Example of the service response:

POST ​/v1​/auth​/login

The method is used for obtaining of a new authorization token for a user.

The method query contains following data:

  • name – user name;

  • password – account password;

  • locale – e-mail notifications language (possible variants: en and ru);

  • source – user type:

Example of the service response:

POST ​/v1​/auth​/token

The method is used for obtaining of authorization tokens for external services and applications. This method does not require any query parameters.

Example of the service response:

POST ​/v1​/auth​/refresh

The method is used for obtaining of a new refresh token. The method query contains a current refresh token value.

Example of the service response:

GET​ /v1​/auth​/publicKey

The method is used for obtaining of an authorization service public key. This method does not require any parameters in its query.

Example of the service response: