跳转到内容
简体中文

在浏览器中登录

POST/v1/auth/login

该路线适用于 adapt-mail.com,需要 Origin: https://adapt-mail.com. 返回 HttpOnly cookies 和未分类 session_id. 供您的客户使用 /v1/auth/token.

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

要求

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

请求正文 · application/json

object

login一定

string

password一定

string

minLength: 1

maxLength: 128

mode

string

有效值: "account" "mailbox"

默认: "account"

不接受未知字段。

响应

200 成功回复

application/json

object

mailbox_id
选项 1

integer

选项 2

null

session_id

string · uuid

401 需要登录

application/json

object

detail
选项 1

string

选项 2

object

code

string

message

string

选项 3

array

数组元素

object

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

422 验证错误

application/json

object

detail

array

数组元素

object

loc一定

array

数组元素
选项 1

string

选项 2

integer

msg一定

string

type一定

string

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