Authentication Credentials and Storage
mainWhen the QR code status reaches confirmed, the API returns the following credentials required for all subsequent business requests:
bot_token: The Bearer Token used in theAuthorizationheader.ilink_bot_id: The Bot account ID (e.g.,...@im.bot).ilink_user_id: The authorized WeChat user ID (e.g.,...@im.wechat).baseurl: The business API base URL. Use this instead of the default if it differs.
Storage Recommendations:
- Persist
bot_tokenandbaseurltogether to avoid using stale base URLs after a restart. - Store credentials for each
ilink_bot_idseparately; do not share state files across multiple accounts. - Set file permissions to
0600for security.