Invoke graphic captcha interface

API Call Address

{域名地址}/api/captcha

Description:{域名地址}Need to replace it with your domain address, such ashttps://en.anqicms.com/api/captcha

Calling method

GET

Request parameters

None

Return parameters

Field name Type Description
code int error code
msg string error reason description
data object Captcha content

data parameter

Field name Type Description
Captcha string captcha The base64 encoded string of the graphic captcha
captcha_id string captcha The ID of the graphic captcha

request data example

Return Data Example

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

Error Code

error code Description
0 OK
-1 Error, the reason is indicated in the msg
1001 Not logged in
1002 Unauthorized
200 API request OK