企业微信(WeCom)-基础 icon

企业微信(WeCom)-基础

企业微信基础功能 - 通讯录、应用消息、群聊、消息推送、企业互联、素材、系统、电子发票、第三方应用授权、接口调用许可、收银台、对外收款、小程序对外收款、企业红包/向员工付款、数据与智能专区、会话内容存档、推广二维码、账号ID、安全管理

Actions248

企业互联 → [认证与访问] 获取下级/下游企业小程序 Session

AI-generated

Summary

Retrieves a WeCom mini-program session for a user in a linked lower-level or downstream enterprise, using the upstream session key and the linked enterprise’s app details.

Inputs

  • 下级/下游企业 CorpID (corpid) (required) — CorpID of the linked lower-level or downstream enterprise; used to obtain its access token.
  • 下级/下游应用 AgentID (agentid) (required) — ID of the app shared with that enterprise.
  • 业务类型 (business_type) — Select enterprise/school linkage (0) or upstream/downstream enterprise (1); defaults to upstream/downstream enterprise. Used when obtaining the linked enterprise access token.
  • 加密用户 ID (userid) (required) — Encrypted user ID returned by the upstream enterprise’s code2Session; up to 64 bytes.
  • 上级/上游会话密钥 (session_key) (required) — Session key returned by the upstream enterprise’s code2Session; up to 64 bytes.

Output shape

A single item containing the WeCom API response for the mini-program session request.

The operation uses the supplied linked enterprise CorpID, app AgentID, and business type to obtain access and submits the encrypted user ID with the upstream session key. The source pack provides signatures only for the implementation, so it does not establish the exact response fields.

Examples

Example 1: Sample case

One item for CorpID ww1234567890abcdef, AgentID 1000001, business type 1, and the upstream code2Session userid/session_key values. The node requests the linked enterprise mini-program session and returns the API response item.

Links

Discussion