Delete Friend Link Interface

Delete the specified friendship link record from the system, identifying the friendship link to be deleted by the link address.

Precautions

  • This interface uses the POST method to submit data in form-data format
  • Need to provide a valid backend import interface Token for authentication
  • The URL of the friendship link to be deleted must be provided
  • The delete operation is irreversible, please operate with caution
  • After deletion, a successful message will be returned

Request address

{域名地址}/api/friendlink/delete?token={token}

Description:{域名地址}It needs to be replaced with your domain address.{token}The Token needs to be replaced with the one in the background content import interface function:https://en.anqicms.com/api/friendlink/delete?token=xxx

Request syntax

POST {域名地址}/api/friendlink/delete?token={token}
Content-Type: multipart/form-data

Request Parameters

GET Parameter

Field Name Type Required Description
token string Yes Token in the background content import interface function

POST parameters

Field Name Type Required Description
link string Yes The other link

Return parameters

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

Example Usage

Request Example

POST /api/friendlink/delete?token=4712a54b4c456bb29b7816d241db69a7 HTTP/1.1
Host: www.anqicms.com
Content-Type: multipart/form-data; boundary=----WebKitFormBoundary7MA4YWxkTrZu0gW

------WebKitFormBoundary7MA4YWxkTrZu0gW
Content-Disposition: form-data; name="link"

https://en.anqicms.com/
------WebKitFormBoundary7MA4YWxkTrZu0gW--

Or use the curl command:

curl -X POST \
  'https://en.anqicms.com/api/friendlink/delete?token=4712a54b4c456bb29b7816d241db69a7' \
  -H 'Content-Type: multipart/form-data' \
  -F 'link=https://en.anqicms.com/'

Response Example

{
  "code": 0,
  "msg": "链接已删除"
}

Error response example

{
  "code": -1,
  "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