Used to verify whether the friendship link interface configuration is correct, check whether the Token is valid, and ensure that the friendship link function can be used normally.
Points to note
- This interface supports GET or POST methods
- An effective background import interface Token is required for authentication
- 主要用于测试friend link interface connection status
- No additional parameters are required, only to verify the validity of the Token
Request address
{域名地址}/api/friendlink/check?token={token}
Description:{域名地址}Replace with your domain address,{token}Need to be replaced with the Token from the background content import interface, such ashttps://en.anqicms.com/api/friendlink/check?token=xxx
Request Syntax
GET/POST {域名地址}/api/friendlink/check?token={token}
Request parameters
GET parameters
| Field name | Type | Required | Description |
|---|---|---|---|
| token | string | Is | Token in the background content import interface function |
Return parameters
| Field name | Type | Description |
|---|---|---|
| code | int | Error code |
| msg | string | Error description |
Usage Example
Request example
GET /api/friendlink/check?token=4712a54b4c456bb29b7816d241db69a7 HTTP/1.1
Host: www.anqicms.com
Or use the POST method:
POST /api/friendlink/check?token=4712a54b4c456bb29b7816d241db69a7 HTTP/1.1
Host: www.anqicms.com
Content-Type: application/x-www-form-urlencoded
Response Example
{
"code": 0,
"msg": "验证成功"
}
Example of error response
{
"code": -1,
"msg": "Token无效"
}
error code
| Error code | Description |
|---|---|
| 0 | OK |
| -1 | Error, the reason is indicated in msg |
| 1001 | Not logged in |
| 1002 | Not authorized |
| 200 | API request OK |