Login / Logout


Login

url

https://api.pycon.shop/rest-auth/login/

method

POST

Data Params

key required value
email true email
password true password

Success Response

{
    "key": "edfa17bfcdecwe34ea5b9daec538f0957a561ff0"
}

Error Response

  • 필수 필드 누락
{
    "non_field_errors": [
        "Must include \"email\" and \"password\"."
    ]
}
  • 로그인 실
{
    "non_field_errors": [
        "Unable to log in with provided credentials."
    ]
}

Logout

url

https://api.pycon.shop/rest-auth/logout/

method

POST

Data Params

key required value
Authorization true token

Success Response

{
    "detail": "Successfully logged out."
}

Error Response

  • 인증되지 않은 토큰
{
    "detail": "Invalid token."
}

results matching ""

    No results matching ""