Send Email Verification Interface

Send a verification email to the specified email address. The email contains a verification link, and the user must click the link to complete email verification.

Precautions

  • This interface uses the POST method and requires data to be submitted in application/ format
  • This interface is used to send a verification email to the specified email address
  • The email contains a verification link, which the user must click to complete the verification
  • Supports various verification scenarios (email verification, password reset, etc.)
  • A valid email address and verification status must be provided
  • After the email is sent successfully, a success message will be returned, but it is not guaranteed that the user will definitely receive the email

Request address

{域名地址}/api/verify/email

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

After calling this interface, the system will send an email to the specified email address. The email contains a verification code. The user can complete the email verification by clicking the link in the email.

Request syntax

POST /api/verify/email
Content-Type: application/json

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
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

Response Headers

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

Return parameters

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

Example Usage

Request Example

POST /api/verify/email HTTP/1.1
Host: www.anqicms.com
Content-Type: application/json

{
  "email": "[email protected]",
  "state": "verify"
}

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