Call the graphical verification code interface

API call address

{域名地址}/api/captcha

illustrate:{域名地址}You need to replace it with your domain address, such as/api/captcha

Calling methods

GET

Request parameters

none

Return parameters

Field name type illustrate
code int Error code
msg string Error Cause Description
data object captcha content

Data parameters

Field name type illustrate
captcha string Base64 encoded string for captcha graphic verification code
captcha_id string The ID of the captcha graphic verification code

Request data example

none

Return to the data example

{
    "code": 0,
    "data": {
        "captcha": "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAPAAAABMCAIAAADcP63LAAAVH0lEQVR4nO...",
        "captcha_id": "g0HFYRQUrC9rYbX2EZMH"
    },
    "msg": ""
}

Error code

Error code illustrate
0 OK
-1 Error, the cause of the error is pointed out in msg
1001 Not logged in
1002 Unauthorized
200 API request OK