Skip to content
On this page

Authorization API

EndpointMethodDescription
/auth/signoutwebRequestLogout
/api/v1/auth/signoutwebRequestLogout
/auth/isEmailVerifiedwebRequestCheck email is verified
/api/v1/auth/isEmailVerifiedwebRequestCheck email is verified
/auth/link/openid-connect/{providerId}webRequestLink social network account to user using Open Id Connect (OIDC) protocol
/auth/link/applewebRequestLink Apple account to user
/auth/link/facebookwebRequestLink Facebook account to user
/auth/link/verus/idLoginwebRequestLink account with Verus
/auth/link/verus/idLoginV2webRequestLink account with Verus (v2)
/auth/link/verus/idLogin/testnetwebRequestLink account with Verus (TESTNET)
/auth/link/verus/checkChallengewebRequestCheck Verus challenge for link account
/auth/checkwebRequestCheck if user is authorized
/api/v1/auth/checkwebRequestCheck if user is authorized
/auth/requestEmailVerificationwebRequestRequest email verification
/api/v1/auth/requestEmailVerificationwebRequestRequest email verification
/auth/isEmailAvailablewebRequestCheck email availability
/api/v1/auth/isEmailAvailablewebRequestCheck email availability
/auth/isEmailTakenwebRequestCheck email is taken
/api/v1/auth/isEmailTakenwebRequestCheck email is taken
/auth/getRedirectUrlForOPwebRequestGet redirect url for OpenID Provider authorization
/auth/openid-connect/{providerId}webRequestAuthorize user using Open Id Connect (OIDC) protocol
/auth/applewebRequestAuthorize using Apple code
/auth/verus/idLoginwebRequestAuthorize user with Verus
/auth/verus/idLoginV2webRequestAuthorize user with Verus (v2)
/auth/verus/idLogin/testnetwebRequestAuthorize user with Verus (TESTNET)
/auth/verus/idLogin/testnetExtwebRequestAuthorize user with Verus (TESTNET)
/auth/verus/idLoginResponseMobilewebRequestSend Verus login response from mobile to crypto server
/auth/verus/idLoginResponseMobileTestnetwebRequestSend Verus login response from mobile to crypto server (TESTNET)
/auth/verus/checkChallengewebRequestCheck Verus challenge for authorization
/auth/signinwebRequestRegular login
/api/v1/auth/signinwebRequestRegular login
/auth/signupwebRequestRegular registration
/api/v1/auth/signupwebRequestRegular registration
/auth/registerByTokenwebRequestRegister by token
/api/v1/auth/registerByTokenwebRequestRegister by token
/auth/requestPasswordRestorewebRequestRequest password restore
/auth/sendRestorePasswordCodewebRequestSend restore password code
/api/v1/auth/sendRestorePasswordCodewebRequestSend restore password code
/auth/checkRestorePasswordCodewebRequestCheck restore password code
/api/v1/auth/checkRestorePasswordCodewebRequestCheck restore password code
/auth/restorePasswordByCodewebRequestRestore password by code
/api/v1/auth/restorePasswordByCodewebRequestRestore password by code
/api/v1/auth/getOneTimeAuthTokenwebRequestGet one time auth token
/api/v1/auth/checkOneTimeAuthToken/{token}webRequestCheck one time auth token
auth:verusIdLoginwebsocketVerus ID Login
auth:verusIdLoginTestnetwebsocketVerus ID Login (VALUVERSE TESTNET)
auth:verusIdLoginTestnetExtwebsocketVerus ID Login (VERUS TESTNET)
auth:verusLinkIdLoginwebsocketLink Verus account with Verus ID Login
auth:verusLinkIdLoginTestnetwebsocketLink Verus account with Verus ID Login (VALUVERSE TESTNET)
auth:verusLinkIdLoginTestnetExtwebsocketLink Verus account with Verus ID Login (VERUS TESTNET)
auth:verusLinkPersonaAccountwebsocketLink Valuverse persona using Verus ID Login
auth:verusSimulateVerusIdLoginResponsewebsocketSimulate Verus Id login response (VALUVERSE TESTNET)
auth:verusAuthSuccesswebsocketEventVerus authorization success event
auth:verusAuthErrorwebsocketEventVerus authorization error event
auth:verusLinkSuccesswebsocketEventVerus link account success event
auth:verusLinkErrorwebsocketEventVerus link account error event

Logout

HTTP Method: POST

Path: /auth/signout

DEPRECATED

Description: Api drops users session.

Headers:

X-Session-Id: sessionId

Request:

{ empty }

Response:

{ empty }

Logout

HTTP Method: POST

Path: /api/v1/auth/signout

Description: Api drops users session.

Headers:

X-Session-Id: sessionId

Request:

{ empty }

Response:

{
    "error": { "status": bool, "code": int, "message": string }
}

Check email is verified

HTTP Method: POST

Path: /auth/isEmailVerified

DEPRECATED

Request:

{ empty }

Response:

{
    "isVerified": bool
}

Check email is verified

HTTP Method: POST

Path: /api/v1/auth/isEmailVerified

Request:

{ empty }

Response:

{
    "data": {
        "isVerified": bool
    }
    "error": { "status": bool, "code": int, "message": string }
}

HTTP Method: GET

Path: /auth/link/openid-connect/

Description: API redirects to provider authorization page. API requires valid redirect_uri to client.

  • On success provider redirects to valuverse server with authorization code. Then valuverse server validates authorization code with provider, fetches user info, links social account to user and redirects to redirect_uri.

  • On failure, server redirects to redirect_uri with error={error} in query params.

Available providers:

  • google
  • facebook
  • apple
  • epam
  • epam.social
  • merkos302

In case when epam.social provider is selected, client must also select one of epam social networks (socialId): google, facebook, linkedin

Parameters:

redirect_uri: string

socialId: string (used only for epam.social provider)

Request:

{ empty }

Response:

Redirect to provider authorization page

HTTP Method: POST

Path: /auth/link/apple

Request:

{
    "appId": string
    "code": [ byte ]
    "idToken": [ byte ]
    "user": {
        "firstName": string
        "lastName": string
        "email": string
    }
}

Response:

{ empty }

HTTP Method: POST

Path: /auth/link/facebook

Request:

{
    "token": string
}

Response:

{ empty }

HTTP Method: POST

Path: /auth/link/verus/idLogin

Description: Verus link account for mobile platforms. Endpoint creates Verus challenge and returns challengeId and deeplink. Client opens Verus application with deeplink and authorizes with Verus account. After successful authorization, Verus application redirects client to redirectUrl. When client returned to Valuverse application it should call /auth/link/verus/checkChallenge endpoint for checking Verus link account result.

Request:

{
    "redirectUrl": string
    "isMobile": bool
    "publicKey": string  // public key to securely fetch scoped root key from Verus wallet using RSA encryption
    "zAddress": string  // zAddress to securely fetch scoped root key from Verus wallet using zAddess encryption
    "encVersion": string  // encryption version, like 'verus.v0'
}

Response:

{
    "challengeId": string
    "deepLink": string
}

HTTP Method: POST

Path: /auth/link/verus/idLoginV2

Description: Verus link account for mobile platforms. Endpoint creates Verus challenge and returns challengeId and deeplink. Client opens Verus application with deeplink and authorizes with Verus account. After successful authorization, Verus application redirects client to redirectUrl. When client returned to Valuverse application it should call /auth/link/verus/checkChallenge endpoint for checking Verus link account result.

Request:

{
    "redirectUrl": string
    "isMobile": bool
    "publicKey": string  // public key to securely fetch scoped root key from Verus wallet using RSA encryption
    "zAddress": string  // zAddress to securely fetch scoped root key from Verus wallet using zAddess encryption
    "encVersion": string  // encryption version, like 'verus.v0'
}

Response:

{
    "challengeId": string
    "deepLink": string
}

HTTP Method: POST

Path: /auth/link/verus/idLogin/testnet

Description: Verus link account for mobile platforms. Endpoint creates Verus challenge and returns challengeId and deeplink. Client opens Verus application with deeplink and authorizes with Verus account. After successful authorization, Verus application redirects client to redirectUrl. When client returned to Valuverse application it should call /auth/link/verus/checkChallenge endpoint for checking Verus link account result.

Request:

{
    "redirectUrl": string
    "isMobile": bool
    "publicKey": string  // public key to securely fetch scoped root key from Verus wallet using RSA encryption
    "zAddress": string  // zAddress to securely fetch scoped root key from Verus wallet using zAddess encryption
    "encVersion": string  // encryption version, like 'verus.v0'
}

Response:

{
    "challengeId": string
    "deepLink": string
}

HTTP Method: POST

Path: /auth/link/verus/checkChallenge

Description: Checks Verus link account result after /auth/link/verus/idLogin.

Request:

{
    "challengeId": string
}

Response:

{ empty }

Check if user is authorized

HTTP Method: GET

Path: /auth/check

DEPRECATED

Description: Api returns 200 Ok if user is authorized, and 401 Unauthorized if not.

Request:

{ empty }

Response:

{ empty }

Check if user is authorized

HTTP Method: GET

Path: /api/v1/auth/check

Description: Api returns 401: Unauthorized error in case if user is not authorized.

Request:

{ empty }

Response:

{
    "error": { "status": bool, "code": int, "message": string }
}

Request email verification

HTTP Method: POST

Path: /auth/requestEmailVerification

DEPRECATED

Description: Returns http status 429 (StatusTooManyRequests) in case if email verification requests are more frequent than 1 per minute.

Request:

{
    "email": string
}

Response:

{ empty }

Request email verification

HTTP Method: POST

Path: /api/v1/auth/requestEmailVerification

Description: Api returns 705: Too frequent request error in case if email verification requests are more frequent than 1 per minute.

Request:

{
    "email": string
}

Response:

{
    "error": { "status": bool, "code": int, "message": string }
}

Check email availability

HTTP Method: POST

Path: /auth/isEmailAvailable

DEPRECATED

Request:

{
    "email": string
}

Response:

{
    "isAvailable": bool
}

Check email availability

HTTP Method: POST

Path: /api/v1/auth/isEmailAvailable

Request:

{
    "email": string
}

Response:

{
    "data": {
        "isAvailable": bool
    }
    "error": { "status": bool, "code": int, "message": string }
}

Check email is taken

HTTP Method: POST

Path: /auth/isEmailTaken

DEPRECATED

Request:

{
    "email": string
}

Response:

{
    "isTaken": bool
}

Check email is taken

HTTP Method: POST

Path: /api/v1/auth/isEmailTaken

Request:

{
    "email": string
}

Response:

{
    "data": {
        "isTaken": bool
    }
    "error": { "status": bool, "code": int, "message": string }
}

Get redirect url for OpenID Provider authorization

HTTP Method: GET

Path: /auth/getRedirectUrlForOP

Parameters:

opAuthReqId: string

sessionId: string

Request:

{ empty }

Response:

{
    "data": {
        "redirectUrl": string
    }
    "error": { "status": bool, "code": int, "message": string }
}

Authorize user using Open Id Connect (OIDC) protocol

HTTP Method: GET

Path: /auth/openid-connect/

Description: API redirects to provider authorization page. API requires valid redirect_uri to client.

  • On success provider redirects to valuverse server with authorization code. Then valuverse server validates authorization code with provider, fetches user info, creates new user if needed, creates user session and redirects to redirect_uri with sessionId={sessionId} and isNew={true/false} in query params.

  • On failure, server redirects to redirect_uri with error={error} in query params.

Available providers:

  • google
  • facebook
  • apple
  • epam
  • epam.social
  • merkos302

In case when epam.social provider is selected, client must also select one of epam social networks (socialId): google, facebook, linkedin

Parameters:

redirect_uri: string

networkId: string

deviceId: string

socialId: string (used only for epam.social provider)

Request:

{ empty }

Response:

Redirect to provider authorization page

Authorize using Apple code

HTTP Method: POST

Path: /auth/apple

Headers:

X-Network: networkId

X-Device-Id: deviceId

Request:

{
    "appId": string
    "code": [ byte ]
    "idToken": [ byte ]
    "user": {
        "firstName": string
        "lastName": string
        "email": string
    }
}

Response:

{
    "session_token": string
    "is_new": bool
    "need_verification": bool
}

Authorize user with Verus

HTTP Method: POST

Path: /auth/verus/idLogin

Description: Verus authorization for mobile platforms. Endpoint creates Verus challenge and returns challengeId and deeplink. Client opens Verus application with deeplink and authorizes with Verus account. After successful authorization, Verus application redirects client to redirectUrl. When client returned to Valuverse application it should call /auth/verus/checkChallenge endpoint for checking Verus authorization result.

Request:

{
    "redirectUrl": string
    "isMobile": bool
    "publicKey": string  // public key to securely fetch scoped root key from Verus wallet using RSA encryption
    "zAddress": string  // zAddress to securely fetch scoped root key from Verus wallet using zAddess encryption
    "encVersion": string  // encryption version, like 'verus.v0'
}

Response:

{
    "challengeId": string
    "deepLink": string
}

Authorize user with Verus (v2)

HTTP Method: POST

Path: /auth/verus/idLoginV2

Description: Verus authorization for mobile platforms. Endpoint creates Verus challenge and returns challengeId and deeplink. Client opens Verus application with deeplink and authorizes with Verus account. After successful authorization, Verus application redirects client to redirectUrl. When client returned to Valuverse application it should call /auth/verus/checkChallenge endpoint for checking Verus authorization result.

Request:

{
    "redirectUrl": string
    "isMobile": bool
    "publicKey": string  // public key to securely fetch scoped root key from Verus wallet using RSA encryption
    "zAddress": string  // zAddress to securely fetch scoped root key from Verus wallet using zAddess encryption
    "encVersion": string  // encryption version, like 'verus.v0'
}

Response:

{
    "challengeId": string
    "deepLink": string
}

Authorize user with Verus (TESTNET)

HTTP Method: POST

Path: /auth/verus/idLogin/testnet

Description: Verus authorization for mobile platforms. Endpoint creates Verus challenge and returns challengeId and deeplink. Client opens Verus application with deeplink and authorizes with Verus account. After successful authorization, Verus application redirects client to redirectUrl. When client returned to Valuverse application it should call /auth/verus/checkChallenge endpoint for checking Verus authorization result.

Request:

{
    "redirectUrl": string
    "isMobile": bool
    "publicKey": string  // public key to securely fetch scoped root key from Verus wallet using RSA encryption
    "zAddress": string  // zAddress to securely fetch scoped root key from Verus wallet using zAddess encryption
    "encVersion": string  // encryption version, like 'verus.v0'
}

Response:

{
    "challengeId": string
    "deepLink": string
}

Authorize user with Verus (TESTNET)

HTTP Method: POST

Path: /auth/verus/idLogin/testnetExt

Description: Verus authorization for mobile platforms. Endpoint creates Verus challenge and returns challengeId and deeplink. Client opens Verus application with deeplink and authorizes with Verus account. After successful authorization, Verus application redirects client to redirectUrl. When client returned to Valuverse application it should call /auth/verus/checkChallenge endpoint for checking Verus authorization result.

Request:

{
    "redirectUrl": string
    "isMobile": bool
    "publicKey": string  // public key to securely fetch scoped root key from Verus wallet using RSA encryption
    "zAddress": string  // zAddress to securely fetch scoped root key from Verus wallet using zAddess encryption
    "encVersion": string  // encryption version, like 'verus.v0'
}

Response:

{
    "challengeId": string
    "deepLink": string
}

Send Verus login response from mobile to crypto server

HTTP Method: POST

Path: /auth/verus/idLoginResponseMobile

Request:

{
    "queryParams": string
}

Response:

{ empty }

Send Verus login response from mobile to crypto server (TESTNET)

HTTP Method: POST

Path: /auth/verus/idLoginResponseMobileTestnet

Request:

{
    "queryParams": string
}

Response:

{ empty }

Check Verus challenge for authorization

HTTP Method: POST

Path: /auth/verus/checkChallenge

Description: Checks Verus authorization result after /auth/verus/idLogin.

Request:

{
    "challengeId": string
}

Response:

{
    "session_token": string
    "is_new": bool
    "need_verification": bool
}

Regular login

HTTP Method: POST

Path: /auth/signin

DEPRECATED

Description: Api returns 400 HTTP error in case of login failure.

Headers:

X-Network: networkId // creates session within provided network (alternatively use url param networkId)

X-Socket-Id: socketId // send anonymousAuthorized event after login (alternatively use url param socketId)

Request:

{
    "email": string
    "password": string
}

Response:

{
    "session_token": string
    "is_new": bool
    "need_verification": bool
}

Regular login

HTTP Method: POST

Path: /api/v1/auth/signin

Headers:

X-Network: networkId // creates session within provided network (alternatively use url param networkId)

X-Socket-Id: socketId // send anonymousAuthorized event after login (alternatively use url param socketId)

Request:

{
    "email": string
    "password": string
}

Response:

{
    "data": {
        "session_token": string
        "is_new": bool
        "need_verification": bool
    }
    "error": { "status": bool, "code": int, "message": string }
}

Regular registration

HTTP Method: POST

Path: /auth/signup

DEPRECATED

Description: Api returns 400 HTTP error in case of registration failure. If verificationToken provided in request, api will try to register verified user. It will return error in case if verificationToken is invalid or mismatches with provided email.

Headers:

X-Network: networkId // Creates session within provided network

Request:

{
    "email": string
    "password": string
    "phoneNumber": string
    "firstName": string
    "lastName": string
    "zipCode": string
    "verificationToken": string
    "companyName": string  // name of company that user represents
    "companyTitle": string  // user title in the company
}

Response:

{
    "session_token": string
    "is_new": bool
    "need_verification": bool
}

Regular registration

HTTP Method: POST

Path: /api/v1/auth/signup

Description: If verificationToken provided in request, api will try to register verified user. It will return error in case if verificationToken is invalid or mismatches with provided email.

Headers:

X-Network: networkId // Creates session within provided network

Request:

{
    "email": string
    "password": string
    "phoneNumber": string
    "firstName": string
    "lastName": string
    "zipCode": string
    "verificationToken": string
    "companyName": string  // name of company that user represents
    "companyTitle": string  // user title in the company
}

Response:

{
    "data": {
        "session_token": string
        "is_new": bool
        "need_verification": bool
    }
    "error": { "status": bool, "code": int, "message": string }
}

Register by token

HTTP Method: POST

Path: /auth/registerByToken

DEPRECATED

Description: returns 400 HTTP error in case of registration failure. If verificationToken provided in request, api will try to register verified user. It will return error in case if verificationToken is invalid or mismatches with provided email.

Headers:

X-Network: networkId // Creates session within provided network

Request:

{
    "email": string
    "password": string
    "phoneNumber": string
    "firstName": string
    "lastName": string
    "zipCode": string
    "verificationToken": string
    "companyName": string  // name of company that user represents
    "companyTitle": string  // user title in the company
}

Response:

{
    "session_token": string
    "is_new": bool
    "need_verification": bool
}

Register by token

HTTP Method: POST

Path: /api/v1/auth/registerByToken

Description: If verificationToken provided in request, api will try to register verified user. It will return error in case if verificationToken is invalid or mismatches with provided email.

Headers:

X-Network: networkId // Creates session within provided network

Request:

{
    "email": string
    "password": string
    "phoneNumber": string
    "firstName": string
    "lastName": string
    "zipCode": string
    "verificationToken": string
    "companyName": string  // name of company that user represents
    "companyTitle": string  // user title in the company
}

Response:

{
    "data": {
        "session_token": string
        "is_new": bool
        "need_verification": bool
    }
    "error": { "status": bool, "code": int, "message": string }
}

Request password restore

HTTP Method: POST

Path: /auth/requestPasswordRestore

Description: returns 400 HTTP error in case of request error

Request:

{
    "email": string
}

Response:

{ empty }

Send restore password code

HTTP Method: POST

Path: /auth/sendRestorePasswordCode

DEPRECATED

Description: Api sends an email message with 6-digit code that should be used in order to restore user password. Restore password code lives for 20 minutes and becomes invalid after that time.

  • Api returns 1021: User not found error in case when invalid email provided.

Request:

{
    "email": string
}

Response:

{ empty }

Send restore password code

HTTP Method: POST

Path: /api/v1/auth/sendRestorePasswordCode

Description: Api sends an email message with 6-digit code that should be used in order to restore user password. Restore password code lives for 20 minutes and becomes invalid after that time.

  • Api returns 1021: User not found error in case when invalid email provided.

Request:

{
    "email": string
}

Response:

{
    "error": { "status": bool, "code": int, "message": string }
}

Check restore password code

HTTP Method: POST

Path: /auth/checkRestorePasswordCode

DEPRECATED

Description: Api checks if provided restore password code is valid.

  • Api returns 1021: User not found error in case when invalid email provided.

  • Api returns 705: Too frequent request error in case when user tries to check code more than 5 times in 2 minutes.

  • Api returns 1051: Verification token not found error in case when invalid code provided.

Request:

{
    "email": string
    "code": string
}

Response:

{ empty }

Check restore password code

HTTP Method: POST

Path: /api/v1/auth/checkRestorePasswordCode

Description: Api checks if provided restore password code is valid.

  • Api returns 1021: User not found error in case when invalid email provided.

  • Api returns 705: Too frequent request error in case when user tries to check code more than 5 times in 2 minutes.

  • Api returns 1051: Verification token not found error in case when invalid code provided.

Request:

{
    "email": string
    "code": string
}

Response:

{
    "error": { "status": bool, "code": int, "message": string }
}

Restore password by code

HTTP Method: POST

Path: /auth/restorePasswordByCode

DEPRECATED

Description: Api changes user password using restore password code.

  • Api returns 1021: User not found error in case when invalid email provided.

  • Api returns 705: Too frequent request error in case when user tries to restore password more than 5 times in 2 minutes.

  • Api returns 1006: Invalid password error in case when invalid new password provided.

  • Api returns 1051: Verification token not found error in case when invalid code provided.

  • Api returns 1054: Verification token is already used error in case when restore code have already been used.

Request:

{
    "email": string
    "code": string
    "password": string
}

Response:

{ empty }

Restore password by code

HTTP Method: POST

Path: /api/v1/auth/restorePasswordByCode

Description: Api changes user password using restore password code.

  • Api returns 1021: User not found error in case when invalid email provided.

  • Api returns 705: Too frequent request error in case when user tries to restore password more than 5 times in 2 minutes.

  • Api returns 1006: Invalid password error in case when invalid new password provided.

  • Api returns 1051: Verification token not found error in case when invalid code provided.

  • Api returns 1054: Verification token is already used error in case when restore code have already been used.

Request:

{
    "email": string
    "code": string
    "password": string
}

Response:

{
    "error": { "status": bool, "code": int, "message": string }
}

Get one time auth token

HTTP Method: POST

Path: /api/v1/auth/getOneTimeAuthToken

Request:

map[string]{ custom structure }

Response:

{
    "data": {
        "token": string
    }
    "error": { "status": bool, "code": int, "message": string }
}

Check one time auth token

HTTP Method: POST

Path: /api/v1/auth/checkOneTimeAuthToken/

Request:

{ empty }

Response:

{
    "data": {
        "session_token": string
        "is_new": bool
        "need_verification": bool
    }
    "error": { "status": bool, "code": int, "message": string }
}

Verus ID Login

Method: websocket

Endpoint: auth:verusIdLogin

Description: Endpoint returns deeplink that should be used for Verus authorization. After Verus authorization is finished, server sends auth:verusAuthSuccess or auth:verusAuthError event.

Request:

{
    "data": {
        "redirectUrl": string
        "isMobile": bool
        "publicKey": string  // public key to securely fetch scoped root key from Verus wallet using RSA encryption
        "zAddress": string  // zAddress to securely fetch scoped root key from Verus wallet using zAddess encryption
        "encVersion": string  // encryption version, like 'verus.v0'
    }
    "event": { "id": string, "date": timestamp }
}

Response:

{
    "data": {
        "challengeId": string
        "deepLink": string
    }
    "error": { "status": bool, "code": int, "message": string }
}

Verus ID Login (VALUVERSE TESTNET)

Method: websocket

Endpoint: auth:verusIdLoginTestnet

Description: Endpoint returns deeplink that should be used for Verus authorization. After Verus authorization is finished, server sends auth:verusAuthSuccess or auth:verusAuthError event.

Request:

{
    "data": {
        "redirectUrl": string
        "isMobile": bool
        "publicKey": string  // public key to securely fetch scoped root key from Verus wallet using RSA encryption
        "zAddress": string  // zAddress to securely fetch scoped root key from Verus wallet using zAddess encryption
        "encVersion": string  // encryption version, like 'verus.v0'
    }
    "event": { "id": string, "date": timestamp }
}

Response:

{
    "data": {
        "challengeId": string
        "deepLink": string
    }
    "error": { "status": bool, "code": int, "message": string }
}

Verus ID Login (VERUS TESTNET)

Method: websocket

Endpoint: auth:verusIdLoginTestnetExt

Description: Endpoint returns deeplink that should be used for Verus authorization. After Verus authorization is finished, server sends auth:verusAuthSuccess or auth:verusAuthError event.

Request:

{
    "data": {
        "redirectUrl": string
        "isMobile": bool
        "publicKey": string  // public key to securely fetch scoped root key from Verus wallet using RSA encryption
        "zAddress": string  // zAddress to securely fetch scoped root key from Verus wallet using zAddess encryption
        "encVersion": string  // encryption version, like 'verus.v0'
    }
    "event": { "id": string, "date": timestamp }
}

Response:

{
    "data": {
        "challengeId": string
        "deepLink": string
    }
    "error": { "status": bool, "code": int, "message": string }
}

Method: websocket

Endpoint: auth:verusLinkIdLogin

Description: Endpoint returns deeplink that should be used for Verus authorization. After Verus authorization is finished, server sends auth:verusLinkSuccess or auth:verusLinkError event.

Request:

{
    "data": {
        "redirectUrl": string
        "isMobile": bool
        "publicKey": string  // public key to securely fetch scoped root key from Verus wallet using RSA encryption
        "zAddress": string  // zAddress to securely fetch scoped root key from Verus wallet using zAddess encryption
        "encVersion": string  // encryption version, like 'verus.v0'
    }
    "event": { "id": string, "date": timestamp }
}

Response:

{
    "data": {
        "challengeId": string
        "deepLink": string
    }
    "error": { "status": bool, "code": int, "message": string }
}

Method: websocket

Endpoint: auth:verusLinkIdLoginTestnet

Description: Endpoint returns deeplink that should be used for Verus authorization. After Verus authorization is finished, server sends auth:verusLinkSuccess or auth:verusLinkError event.

Request:

{
    "data": {
        "redirectUrl": string
        "isMobile": bool
        "publicKey": string  // public key to securely fetch scoped root key from Verus wallet using RSA encryption
        "zAddress": string  // zAddress to securely fetch scoped root key from Verus wallet using zAddess encryption
        "encVersion": string  // encryption version, like 'verus.v0'
    }
    "event": { "id": string, "date": timestamp }
}

Response:

{
    "data": {
        "challengeId": string
        "deepLink": string
    }
    "error": { "status": bool, "code": int, "message": string }
}

Method: websocket

Endpoint: auth:verusLinkIdLoginTestnetExt

Description: Endpoint returns deeplink that should be used for Verus authorization. After Verus authorization is finished, server sends auth:verusLinkSuccess or auth:verusLinkError event.

Request:

{
    "data": {
        "redirectUrl": string
        "isMobile": bool
        "publicKey": string  // public key to securely fetch scoped root key from Verus wallet using RSA encryption
        "zAddress": string  // zAddress to securely fetch scoped root key from Verus wallet using zAddess encryption
        "encVersion": string  // encryption version, like 'verus.v0'
    }
    "event": { "id": string, "date": timestamp }
}

Response:

{
    "data": {
        "challengeId": string
        "deepLink": string
    }
    "error": { "status": bool, "code": int, "message": string }
}

Method: websocket

Endpoint: auth:verusLinkPersonaAccount

Description: Endpoint returns deeplink that should be used for Verus authorization. After Verus authorization is finished, server sends auth:verusLinkPersonaAccountResult event.

Request:

{
    "data": {
        "identityName": string
        "redirectUrl": string
        "isMobile": bool
    }
    "event": { "id": string, "date": timestamp }
}

Response:

{
    "data": {
        "challengeId": string
        "deepLink": string
    }
    "error": { "status": bool, "code": int, "message": string }
}

Simulate Verus Id login response (VALUVERSE TESTNET)

Method: websocket

Endpoint: auth:verusSimulateVerusIdLoginResponse

Request:

{
    "data": {
        "challengeId": string
        "deepLink": string
    }
    "event": { "id": string, "date": timestamp }
}

Response:

{
    "error": { "status": bool, "code": int, "message": string }
}

Verus authorization success event

Event: auth:verusAuthSuccess

Description: Event is emitted after Verus login have been completed and crypto server verifies challengeId. Client should be reconnected with new session id (new socket connection required).

Data:

{
    "data": {
        "sessionId": string
        "isNew": bool
        "cypherData": string  // data from wallet encrypted for client public key or zAddress
        "epk": string  // encryption epk, if used cypherData
    }
    "error": { "status": bool, "code": int, "message": string }
}

Verus authorization error event

Event: auth:verusAuthError

Description: Event is emitted in case if Verus login fails or challengeId verification fails.

Data:

{
    "error": { "status": bool, "code": int, "message": string }
}

Event: auth:verusLinkSuccess

Description: Event is emitted after Verus link account have been completed and crypto server verifies challengeId.

Data:

{
    "data": {
        "cypherData": string  // data from wallet encrypted for client public key or zAddress
        "epk": string  // encryption epk, if used cypherData
    }
    "error": { "status": bool, "code": int, "message": string }
}

Event: auth:verusLinkError

Description: Event is emitted in case if Verus link account fails or challengeId verification fails.

Data:

{
    "error": { "status": bool, "code": int, "message": string }
}