Help Center

Developer Access

Generate a token and pull your subscribed messages with the API.

Use the developer API if you want to sync subscribed WeChat messages into your own system.

Good fit for

  • Internal dashboards or reporting tools
  • Feishu, WeCom, or bot notifications
  • Knowledge bases, vector stores, or AI workflows
  • Scheduled polling and automated classification

Requirements

Before using the API, make sure you have already done both:

  1. Subscribed to at least one official account from the web app
  2. Created a site-wide API key from the web app

How to create an API key

Open the API Key page

  1. Sign in
  2. Open "API Key management" from the profile menu or the standalone API Key page
  3. Create a new API key
  4. Copy and store the key safely

You can now reveal and copy the full API key again from the dashboard later. Keep it secure and avoid exposing it in logs or screenshots. The same key also works for the MD import API.

Endpoint

GET https://api.fafafa.ai/api/v1/wechat/messages

The full production endpoint above is filled in automatically by the system, so you can copy it directly. Its domain comes from the system environment variable WORKER_PUBLIC_BASE_URL, then /api/v1/wechat/messages is appended automatically.

Authentication

Use a Bearer API key:

Authorization: Bearer YOUR_API_KEY

Common query parameters

ParameterDescription
pagePage number for initial sync
pageSizeNumber of items per page
sincePull only messages newer than a given timestamp

Example request

curl 'https://api.fafafa.ai/api/v1/wechat/messages?page=1&pageSize=20' \
  -H 'Authorization: Bearer YOUR_API_KEY' \
  -H 'Accept: application/json'

Initial sync

Start with paginated requests to collect the message history you can access.

Incremental sync

Store the timestamp of the last successful poll and use since to fetch only new messages.

Idempotent processing

If you store messages in your own system, deduplicate by article identifier so repeated polling does not create duplicates.

What should stay in the web app

These actions are still best handled in the web app:

  • Add subscriptions
  • Cancel subscriptions
  • Check plan and quota
  • Create, revoke, or rotate API keys

The API is best used for consuming messages, not for replacing the dashboard.