For the complete documentation index, see llms.txt. This page is also available as Markdown.

用户识别密钥

验证匿名用户识别密钥

post

会验证通过 x-anon-key 头传递的匿名用户识别密钥是否有效。

业务错误代码

以下错误会以 HTTP 200 和 resultType: FAIL 响应。

errorCode
说明

4010

找不到认证信息。

4095

请求已超出限额。请稍后再试。

请求限额: 每个应用每分钟 3,000 次

授权
mutualTLS

这是基于为合作伙伴签发的客户端证书的 mTLS 认证。通过证书的 CN 来识别迷你应用。证书签发·管理方法请参考 使用服务器 API 文档。

头参数
x-anon-keystring必填

用于验证用户的密钥。可通过迷你应用 SDK 的 User.getAnonymousKey 函数获取

Example: kQ7pL2mZxN9wRt5vB8yD3jF6cA1
响应
200

匿名用户识别密钥验证结果会返回 true 或 false。

application/json
post/api-partner/v1/apps-in-toss/users/anon-key/verify
POST /api-partner/v1/apps-in-toss/users/anon-key/verify HTTP/1.1
Host: apps-in-toss-api.toss.im
x-anon-key: {anonKey}
{
  "resultType": "SUCCESS",
  "success": true
}

这有帮助吗?