Two Factor Authentication

API Description

Send captcha to complete two factor authentication.

API Info

API Url Method
[https://[HOST]/eBao/1.0/2fa/sendCode](https://[HOST]/eBao/1.0/2fa/sendCode) POST
Parameter Value
Authorization Get Token via API (/cas/ebao/v1/json/tickets)

API Parameters

Data format: application/json

Name Required Type Description Example
phoneNumber YES String Mobile phone for receive SMS '+8613011111111'
templateCode NO String To use a custom template, you must include code and time parameters, such as: The captcha is ${code} and will expire in ${time} minutes SMS-123456
signName NO String SMS signature eBaoCloud
timeout NO number Captcha timeout, unit: minutes. The default is 15 minutes 15

Successful Response

{
    "successful": true,
    "message": "",
    "token": "xxxxxxxxxxxxxxxx"
}

Failed Response

{
    "successful": false,
    "message": "xxxxxxxxxxxxxxxx",
    "token": ""
}

API Description

Check whether the captcha is correct.

API Info

API Url Method
[https://[HOST]/eBao/1.0/2fa/verifyCode](https://[HOST]/eBao/1.0/2fa/verifyCode) POST
Parameter Value
Authorization Get Token via API (/cas/ebao/v1/json/tickets)

API Parameters

Data format: application/json

Name Required Type Description Example
phoneNumber YES String Mobile phone for receive SMS '+8613011111111'
code YES String Captcha 123456

Successful Response

{
    "verified": true,
    "errorMessage": ""
}

Failed Response

{
    "verified": false,
    "errorMessage": "xxxxxxxxxxxxxxxx"
}

results matching ""

    No results matching ""