跳转到内容
简体中文

用链接换取会话

POST/v1/auth/login-link/consume

仅供 adapt-mail.com 登录页面使用:POST 请求须携带 Origin: https://adapt-mail.com。返回 session_id 和 HttpOnly Cookie。链接已使用或过期时返回 HTTP 410。

授权和访问区域 · 错误和重复

要求

终端窗口
curl -X POST 'https://adapt-mail.com/v1/auth/login-link/consume' \
-H 'Origin: https://adapt-mail.com' \
-c cookies.txt \
-H 'Content-Type: application/json' \
--data '{"token":"<token>"}'

请求正文 · application/json

object

token一定

string

pattern: "^[A-Za-z0-9_-]{43}$"

不接受未知字段。

响应

200 成功回复

application/json

object

mailbox_id一定
选项 1

integer

选项 2

null

session_id一定

string

不接受未知字段。

403 请求错误

application/json

object

detail
选项 1

string

选项 2

object

code

string

message

string

选项 3

array

数组元素

object

404 请求错误

application/json

object

detail
选项 1

string

选项 2

object

code

string

message

string

选项 3

array

数组元素

object

409 请求错误

application/json

object

detail
选项 1

string

选项 2

object

code

string

message

string

选项 3

array

数组元素

object

410 请求错误

application/json

object

detail
选项 1

string

选项 2

object

code

string

message

string

选项 3

array

数组元素

object

422 请求错误

application/json

object

detail
选项 1

string

选项 2

object

code

string

message

string

选项 3

array

数组元素

object

429 请求错误

application/json

object

detail
选项 1

string

选项 2

object

code

string

message

string

选项 3

array

数组元素

object

503 请求错误

application/json

object

detail
选项 1

string

选项 2

object

code

string

message

string

选项 3

array

数组元素

object