manage
manage

Mint End User Token

为集成方的某个用户换一个终端用户令牌(proxy 模式的单点登录握手)。

auth_mode=proxy 的租户在平台上没有原生登录——身份由集成方提供。此前这条路只在 请求头(X-End-User)里走得通,也就是只有服务端对服务端的调用能用;浏览器落在 /t/{alias} 上时无从获得身份,那个页面因此是无法登录的。

有了这个接口,集成方在自己站点确认用户身份后,用租户 API Key 换一个令牌交给浏览器, 握手就闭合了。

只对 proxy / both 开放:platform 模式的租户有自己的登录,再开一条「凭 API Key 就能 冒充任意终端用户」的路没有必要,只是白白扩大攻击面。

调用方必须在服务端持有 API Key。把它放到浏览器里,等于任何人都能签发任意身份。

post/manage/end-user-token

Request

  • Base URL: https://api.agent4.io (the document declares no server; this is the origin it was published from)
  • URL: https://api.agent4.io/manage/end-user-token
  • Auth: none declared

Request body

external_user_idstring required
ttlinteger nullable

Response

Successful Response

tokenstring required
external_user_idstring required
expires_ininteger required

Changes

No recorded changes to this operation across all 1 revision of this API.