Skip to content
Vera edited this page Dec 13, 2018 · 1 revision

POST /auth/convert_token/

Body
{"token": "<facebook-access-token>"
returns
{ "access_token": "<access_token>", "expires_in": 36000, "token_type": "Bearer", "scope": "read write", "refresh_token": "<refresh_token>" }

POST /auth/rest/login/

Body
{ "username": "", "password": "" }
returns:
{ "key": "some-string" }

POST /auth/rest/logout/

Deletes token
Header
Authorization: "Token key"

POST /auth/rest/registration/

Body
{ "username": "", "email": "", "password1": "", "password2": "" }
registers and logins user

returns
{ "key": "some-string" }

GET /auth/rest/user/

returns
{ "pk": integer, "username": "", "email": "", "first_name": "", "last_name": "" }

PUT /auth/rest/user/

Header
Authorization: "Token key"
Body
{ "username": "", "first_name": "", "last_name": "" }

POST /auth/rest/password/change/

Header
Authorization: "Token key"
Body
{ "new_password1": "", "new_password2": "" }
Returns the success/fail message Logout all sessions after password change. Need to look into keeping current session after password change.

Clone this wiki locally