Registration interface

API Call Address

{域名地址}/api/register

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

Calling method

POST

Request parameters

Field name Type Required Description
user_name string No Username
password string No Password
captcha_id string No Graphical Verification Code ID
Captcha string No Graphical Verification Code Value
real_name string No Real Name
avatar_url string No Avatar Address
email string No Email
phone string No Phone Number
code string No Captcha

Return parameters

Field name Type Description
code int error code
msg string error reason description
data object result content
data parameter
Field name Type Description
id int User ID
parent_id int Parent User ID
user_name string Username
real_name string Real Name
avatar_url string User Avatar Address
email string Email Address
phone string Phone Number
group_id int User Group ID
is_retailer int Is a Distributor
balance int user_balance
total_reward int Distributor Cumulative Earnings
invite_code int User Invite Code
Last Login int Last Login Time
expire_time int expiration_time
Created Time int registration_timestamp
updated_time int update timestamp
status int display status
token string Login credentials

request data example

Parameter Value
user_name admin
password 123456
real_name Anqi CMS
email [email protected]

Return Data Example

{
  "code": 0,
  "data": {
    "id": 1000,
    "created_time": 1669012062,
    "updated_time": 1679536756,
    "parent_id": 0,
    "user_name": "admin",
    "real_name": "",
    "avatar_url": "uploads/202211/21/14f56760596b5328.webp",
    "email": "",
    "phone": "",
    "group_id": 2,
    "status": 1,
    "is_retailer": 0,
    "balance": 0,
    "total_reward": 0,
    "invite_code": "anqicms",
    "last_login": 1702912236,
    "expire_time": 1997404800,
    "extra": null,
    "token": "eyJhbGI1NiZXJJZUwNnVCI6IjEwMDAifQ.pLmYPvSajEWrF0FaUGDciOiJIUzIzNiIsILLZBCRm8fYewv49agxlTA26DwIsInR5cCI6IkpXVCJ9.eyJ0IjoiMTcwNTz",
    "group": null,
    "full_avatar_url": "",
    "link": ""
  },
  "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