WeCom x Claimly

企业微信接入指南
WeCom onboarding
for Claimly

从创建企业微信企业,到配置 OAuth、消息回调,再到把关键参数交给 Claimly,这一页把管理员需要做的每一步整理成中英双语的操作说明。

This guide walks an admin through the full setup path: create the WeCom enterprise, find the Corp ID, create a self-built app, configure OAuth and message callbacks, and package the exact values Claimly needs.

管理员权限 / Admin Access

确保你拥有企业微信管理后台权限,并能创建自建应用与配置 API 接收。 Make sure you can create self-built apps and edit API receive settings in the WeCom admin console.

固定域名 / Fixed Domain

OAuth 与消息回调都指向 Claimly 生产域名。 Both OAuth and message callbacks should use the public Claimly production domain.

字段打包 / Keep Values Together

请把 Corp ID、Agent ID、Secret、Token、EncodingAESKey 一次性保存好,后面 Claimly 配置会一次用到。 Save all five values together so Claimly can be configured in one pass.

Copy These Exactly

固定地址与域名 / Fixed Endpoints

OAuth Callback / 网页授权回调
https://claimly.nanocorp.app/api/auth/wecom/callback

用于 OAuth 授权回调。 Use this as Claimly's redirect target in the WeCom OAuth flow.

Trusted Domain / 可信域名
claimly.nanocorp.app

在企业微信网页授权配置中添加这个域名。 Add this host in WeCom's web authorization settings.

Message Receive URL / 消息接收地址
https://claimly.nanocorp.app/api/wecom/callback

用于 URL 验证与后续消息回调。 WeCom will use this for URL verification and encrypted message delivery.

Setup Flow

管理员配置路径 / Admin Flow

企业微信后台 / WeCom Admin
企业信息 / Corp ID
应用管理 / Apps
自建应用 / Agent ID + Secret
网页授权 / OAuth
可信域名 + Callback
接收消息 / API Receive
Token + EncodingAESKey
Claimly 配置包 / Claimly Packet
五个参数一次交付
Step By Step

六步完成企业微信接入

每一步都同时给出中文与英文说明,适合内部 IT、财务、采购或跨语言团队共享。

Account / 企业账号

创建企业微信企业账号 / Create Your WeCom Enterprise

Step 01
中文说明
  • 访问 `work.weixin.qq.com`,按提示注册企业微信企业账号,并完成管理员验证。
  • 建议直接用后续负责配置集成的管理员账号创建,避免权限交接时遗漏。
English
  • Go to `work.weixin.qq.com`, create the enterprise account, and finish the required admin verification.
  • Use the admin account that will own the integration so app permissions and callback settings stay with the right operator.
你要确认的结果 / What You Need
  • 企业已可登录管理后台 / The admin console is accessible
  • 管理员账号已完成验证 / The admin has passed verification
Corp ID / 企业ID

找到企业 ID(Corp ID)/ Find the Corp ID

Step 02
中文说明
  • 登录企业微信管理后台后,在企业信息页查看企业 ID(企业ID)。
  • 复制这个值,它是 Claimly 识别你的 WeCom 企业租户的关键字段。
English
  • In the WeCom admin console, open the enterprise information page and copy the Corp ID.
  • Claimly uses this value to identify the correct WeCom tenant for login and messaging.
管理后台路径 / Admin Path
  • 企业信息 / Enterprise info
  • 字段名称:企业 ID / Corp ID
App / 自建应用

创建自建应用并拿到 Agent ID 与 Secret / Create a Self-built App

Step 03
中文说明
  • 在应用管理中创建一个自建应用,建议命名为 `Claimly` 或 `Claimly Expenses`。
  • 创建完成后打开应用详情,记录 `Agent ID` 与 `Secret`。这两个字段都会被 Claimly 使用。
English
  • Create a self-built app in the application management area and give it a clear name such as `Claimly` or `Claimly Expenses`.
  • After creation, open the app details and copy both the `Agent ID` and the `Secret`.
建议同时配置 / Recommended While You Are Here
  • 应用可见范围 / app visibility scope
  • 应用 logo 与名称 / app branding
  • 员工可从工作台打开应用 / users can launch the app from WeCom
OAuth / 网页授权

配置网页授权与回调地址 / Configure OAuth and Callback

Step 04
中文说明
  • 在自建应用的网页授权配置里,把 Claimly 域名加入可信域名。
  • Claimly 实际使用的 OAuth 回调地址是下方这个固定地址,请确保它与应用配置对应。
English
  • In the self-built app's web authorization settings, add Claimly's host as the trusted domain.
  • Claimly sends users back through the fixed OAuth callback URL below, so make sure the app's authorization settings line up with it.
需要填写 / Exact Values
  • 可信域名 / Trusted domain: claimly.nanocorp.app
  • 回调地址 / OAuth callback: https://claimly.nanocorp.app/api/auth/wecom/callback
Webhook / 消息接收

配置消息接收服务器 / Configure the Message Receive Server

Step 05
中文说明
  • 在目标应用里进入 `接收消息` 或 API 接收配置,填写 Claimly 的消息接收地址。
  • Token 与 EncodingAESKey 由你在企业微信侧设置,然后把同样的值保留给 Claimly。保存时企业微信会先做一次 URL 验证。
English
  • Open the app's message receiving / API receive settings and set Claimly as the callback target.
  • Choose the Token and EncodingAESKey in WeCom, then keep those exact same values for Claimly. WeCom will verify the URL before saving.
需要填写 / Exact Values
  • URL: https://claimly.nanocorp.app/api/wecom/callback
  • Token: 由管理员自定义 / chosen by your admin
  • EncodingAESKey: 43-character AES key / 43 位 EncodingAESKey
Claimly / Claimly 配置

把参数交给 Claimly / Hand the Credentials to Claimly

Step 06
中文说明
  • Claimly 当前托管版本还没有对外开放自助式企业微信设置表单,因此这些值目前由 Claimly 的部署配置读取。
  • 请按下方字段映射整理后一次性交给 Claimly 管理员或部署负责人,避免 Corp ID、Agent ID、Secret、Token、EncodingAESKey 被拆散。
English
  • Claimly's current hosted build does not yet expose a self-serve WeCom settings form, so these values are still read from Claimly's deployment configuration.
  • Package the values below together and hand them to the Claimly admin or deployment owner in one batch so nothing gets mismatched.
Claimly 目前使用的字段 / Current Claimly Config Keys
  • WECOM_CORP_ID
  • WECOM_AGENT_ID
  • WECOM_SECRET
  • WECOM_TOKEN
  • WECOM_ENCODING_AES_KEY
Placeholders

建议放入的截图位

如果后续补真实截图,优先补下面三张,管理员最快能看懂。

企业信息页 / Enterprise Info
Screenshot Placeholder
截图占位

截图占位:标出企业 ID 的位置。 Screenshot placeholder: highlight the Corp ID field in the admin panel.

自建应用详情 / App Details
Screenshot Placeholder
截图占位

截图占位:标出 Agent ID 与 Secret。 Screenshot placeholder: show the self-built app detail view with Agent ID and Secret.

接收消息设置 / Message Receive Settings
Screenshot Placeholder
截图占位

截图占位:标出 URL、Token、EncodingAESKey。 Screenshot placeholder: show the API receive form with URL, Token, and EncodingAESKey.

Claimly Config

Claimly 需要哪些值

Claimly 当前读取五个 WeCom 参数来完成登录与消息回调。OAuth 回调地址和消息接收 URL 是固定值,不需要作为可编辑字段再次录入。

Claimly currently needs five WeCom secrets or identifiers. The OAuth callback URL and message receive URL are fixed by Claimly, so the admin only has to package the values below correctly.

当前产品说明 / Current Product Note

目前 Claimly 托管版本还没有开放自助式企业微信设置页,所以这一步是“把参数交给 Claimly 配置”,而不是在公开站点上直接保存。

The public hosted build does not yet expose a self-serve WeCom settings form, so this step is about handing Claimly the right values in the right shape.

企业微信字段
Claimly Key
用途 / Purpose
企业 ID / Corp ID
WECOM_CORP_ID
标识企业微信租户 / identifies the WeCom tenant
Agent ID / 应用 ID
WECOM_AGENT_ID
Claimly 发送应用消息时使用 / used when Claimly sends app messages
Secret / 应用 Secret
WECOM_SECRET
Claimly 获取 access token 时使用 / used to fetch WeCom access tokens
Token
WECOM_TOKEN
用于消息签名校验 / used for webhook signature validation
EncodingAESKey
WECOM_ENCODING_AES_KEY
用于消息加解密 / used for encrypted message handling
Ready To Configure

先收齐五个参数,再开始 Claimly 配置

如果你已经拿到了 Corp ID、Agent ID、Secret、Token、EncodingAESKey, 这套 WeCom 接入信息就已经足够 Claimly 完成后续对接。

Once those five values are ready, Claimly has everything it needs to finish the current WeCom integration setup.