사용자 토큰 얻기
/v1/auth/token로그인 및 비밀번호를 기반으로 1시간 동안 액세스 토큰을 발급합니다. 모든 계정 사서함에 액세스하려면 mode=account을 지정하고 하나의 주소에 액세스하려면 mode=mailbox을 지정합니다. Authorization: Bearer <access_token> 헤더에 access_token을 전달합니다.
요구
curl -X POST 'https://adapt-mail.com/v1/auth/token' \ -H 'Content-Type: application/json' \ --data '{"login":"user-123","password":"<password>"}'요청 본문 · application/json
object
login반드시stringpassword반드시stringminLength: 1maxLength: 128modestring유효한 값:
"account""mailbox"기본:
"account"
알 수 없는 필드는 허용되지 않습니다.
응답
200 성공적인 응답
application/json
object
access_tokenstringtoken_typestring"Bearer"expires_ininteger3600mailbox_id- 옵션 1
integer옵션 2null
401 로그인이 필요합니다
application/json
object
detail- 옵션 1
string옵션 2objectcodestringmessagestring
옵션 3array배열 요소object
403 접근 불가
application/json
object
detail- 옵션 1
string옵션 2objectcodestringmessagestring
옵션 3array배열 요소object
404 리소스를 찾을 수 없습니다.
application/json
object
detail- 옵션 1
string옵션 2objectcodestringmessagestring
옵션 3array배열 요소object
409 국가 갈등
application/json
object
detail- 옵션 1
string옵션 2objectcodestringmessagestring
옵션 3array배열 요소object
422 유효성 검사 오류
application/json
object
detailarray배열 요소objectloc반드시array배열 요소옵션 1string옵션 2integermsg반드시stringtype반드시string
429 요청이 너무 많습니다.
application/json
object
detail- 옵션 1
string옵션 2objectcodestringmessagestring
옵션 3array배열 요소object
503 일시적인 이용 불가
application/json
object
detail- 옵션 1
string옵션 2objectcodestringmessagestring
옵션 3array배열 요소object