Introduction

The Publisher Configs API is used to manage login credential configurations for various platforms. Before publishing content, it is necessary to configure valid login credentials for the target platform (such as Cookies or Token).

Basic Usage

Create Configuration

curl -X POST 'https://api.acedata.cloud/publisher/configs' \
  -H 'Authorization: Bearer YOUR_TOKEN' \
  -H 'Content-Type: application/json' \
  -d '{
    "channel": "zhihu",
    "credential": {
      "cookies": "z_c0=2|1:0|10:1705312200..."
    }
  }'

Response Example

{
  "success": true,
  "data": {
    "id": "a1b2c3d4-e5f6-7890-abcd-ef1234567890",
    "channel": "zhihu",
    "valid": true,
    "updated_at": "2025-01-15T10:30:00Z"
  }
}

Get Configuration List

curl -X GET 'https://api.acedata.cloud/publisher/configs' \
  -H 'Authorization: Bearer YOUR_TOKEN'

Refresh Configuration

After the credential expires, it can be automatically renewed through a refresh operation:

curl -X POST 'https://api.acedata.cloud/publisher/configs/refresh' \
  -H 'Authorization: Bearer YOUR_TOKEN' \
  -H 'Content-Type: application/json' \
  -d '{
    "id": "a1b2c3d4-e5f6-7890-abcd-ef1234567890"
  }'

Credential Acquisition Method

The method of obtaining credentials varies by platform, typically requiring:

  1. Logging into the target platform in a browser
  2. Opening the developer tools (F12)
  3. Finding Cookies in the Application/Storage tab
  4. Copying the relevant Cookie values

Notes

  • Configuration management operations are free and do not consume points.
  • Only one credential can be configured per platform; repeated configurations will overwrite the previous credential.
  • Credentials may expire, so it is recommended to check regularly or use the refresh function.