Verify Email Address Interface

Verify the validity of the email address, supporting different scenarios such as email verification and password reset.

Precautions

  • This interface is used to verify the validity of the email address.
  • Supports various verification scenarios (email verification, password reset, etc.)
  • Ensures the validity of the request source through token and code parameters
  • Support returning data in or html format
  • After verification, the corresponding operation will be executed according to the state parameter
  • Ensure that the domain address is correctly configured.

Request address

{ๅŸŸๅๅœฐๅ€}/api/verify/email

Description:{ๅŸŸๅๅœฐๅ€}Need to replace it with your domain address, such ashttps://en.anqicms.com/api/verify/email

Request syntax

GET /api/verify/email

Request header

This interface only involves public request headers. For more information, please refer toCommon Request Headers (Common Request Headers).

Request Parameters

Field Name Type Required Description
token string No Token value, verify whether it is from a valid source
code string No code value, check whether the source is valid
email string No email address
state string No state value, verify = Check if the email has been registered, reset = Reset password, other values are not judged
return string No Return data format, or html, default is

Response Headers

This interface only involves public response headers. For more information, please refer toCommon Request Headers (Common Request Headers).

Return parameters

Return different format of data based on the return value of the request parameter:

  • When return=, return JSON formatted data
  • When return=html, return HTML formatted data

JSON formatted return parameters

Field Name Type Description
code integer Error code
message string Error Description

Example Usage

Request Example

GET /api/verify/email?token=abc123&code=xyz789&[email protected]&state=verify&return=json HTTP/1.1
Host: www.anqicms.com

Response Example

{
  "code": 0,
  "msg": "้ชŒ่ฏ้€š่ฟ‡"
}

Error code

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