用户会话
POST /sessions/fetch
获取 Mixin 用户的会话信息, 请求参数是用户 uuid 的数组,注意一个用户可能会有多个 session, public_key 不同。
信息
接口只会返回存在的用户的会话,不存在的会直接忽略。
API 端点 URL
https://api.mixin.one/sessions/fetch
请求体
// user_id 的数组
[
"UUID",
"UUID",
"UUID",
]
请求示例
curl -i -X POST -H "Content-Type: application/json" -H "Authorization: Bearer $TOKEN" https://api.mixin.one/sessions/fetch --data '["06aed1e3-bd77-4a59-991a-5bb5ae6fbb09"]'
Response
// public_key is in format of base64 RawURLEncoding
{
"data": [
{
"user_id": "773e5e77-4107-45c2-b648-8fc722ed77f5",
"session_id": "563e5e77-4107-45c2-b648-8fc722ed77f5",
"public_key": "YYZdUJIdI_cLINM-nO5Ol4aHiD9teT9zptlsrJIyOwA",
"platform": "Android",
},
...
]
}