Skip to main content

Developer FAQ

DeBox Developer FAQ / Troubleshooting

This page covers high-frequency integration issues and practical diagnosis paths.
Primary docs for new integrations:

1. Which document should I start with?

Choose by integration path:

  • Field definitions, enums, success/error samples: OpenAPI.
  • Go SDK with long polling: GO-SDK.
  • Webhook mode: GO-SDK Webhook.

2. Why does getUpdates return no messages?

Most likely webhook is already configured.
In DeBox, webhook and long polling are strictly mutually exclusive:

  • With webhook configured, webhook is the effective receive path.
  • To use long polling, clear webhook config first.

3. How should I fill chat_id and chat_type?

  • chat_type=group: chat_id must be group gid (e.g. cc0onr82).
  • chat_type=private: chat_id must be user user_id (invite code).

These two fields are the primary routing keys for sendMessage / editMessage.

4. For parse_mode=image/video/file, what should content be?

content must be a public URL:

  • image: image URL
  • video: video URL
  • file: file URL

For text modes (richtext/text/Markdown/MarkdownV2/HTML), max content length is 5000 chars.

5. How to secure webhook callbacks?

Webhook callback includes header X-API-KEY = Webhook Key.
Your backend must validate it before processing payload.

Troubleshooting note:

  • Webhook Key rotates when webhook URL changes.
  • Sync the new key to your backend validator.

6. How to diagnose send failures?

Recommended check order:

  1. X-API-KEY header exists and is valid.
  2. chat_type/chat_id mapping is correct.
  3. content is not empty and within limits.
  4. parse_mode matches content format.
  5. For signed endpoints (such as dao_member), verify nonce/timestamp/signature.

7. Common errors and fixes

  • message can't be empty: missing content.
  • message must be less than 5000 characters: text-mode payload too long.
  • message must be less than 2000 bytes: fan-broadcast payload too large.
  • permission denied: caller has no required group admin permission.
  • Param error: missing/invalid parameters (often malformed addresses).

8. How to get gid (group ID)?

Open the target group in app and copy its share link. The id query value is gid.

9. Support channels