Public
Documentation Settings

ACTGrants

Authentication

Here lie all the endpoints related to Users, Authentication, Registration, and Social Authentication

POSTLogin

http://localhost:8000/rest-auth/login/

You can send either one of username or email. After correct creds are verified the server will send a token back to the client. Please put this token in the Headers of each request from the authenticated user after login. With the following key and value.

Key: Authorization
Value: Token <token string, eg: 9611e98cb7f2740ab40cf267611c40f705b2cebd>

AUTHORIZATIONAPI Key
Key
Value

<value>

Bodyurlencoded
username

ypo

password

50L^#5X1HSF76Rlr

Example Request
curl
curl --location 'http://localhost:8000/rest-auth/login/' \
--data-urlencode 'username=par' \
--data-urlencode 'password=asdasdas'
400 Bad Request
Example Response
json
{
  "non_field_errors": [
    "Unable to log in with provided credentials."
  ]
}
Content-Type

application/json

Vary

Accept, Cookie

Allow

POST, OPTIONS

X-Frame-Options

DENY

Content-Length

68

Referrer-Policy

same-origin

Server

Werkzeug/1.0.1 Python/3.8.2

Date

Sat, 29 Aug 2020 08:41:54 GMT

POSTPassword Reset

http://localhost:8000/rest-auth/password/reset/

This will send an email to the user so that they can reset their password. They will reset the password on the webapp itself. The email looks like:

email

email

Bodyurlencoded
email

paramkapur2002@gmail.com

Example Request
curl
curl --location 'http://localhost:8000/rest-auth/password/reset/' \
--data-urlencode 'email=paramkapur2002@gmail.com'
200 OK
Example Response
json
{
  "detail": "Password reset e-mail has been sent."
}
Content-Type

application/json

Vary

Accept, Cookie

Allow

POST, OPTIONS

X-Frame-Options

DENY

Content-Length

49

Referrer-Policy

same-origin

Server

Werkzeug/1.0.1 Python/3.8.2

Date

Sat, 29 Aug 2020 08:51:46 GMT

POSTChange Password

http://localhost:8000/rest-auth/password/change/

This allows a user who is already logged in to change their password.

AUTHORIZATIONAPI Key
Key

Authorization

Value

<value>

Bodyurlencoded
new_password1

abcde1234!

new_password2

abcde1234!

old_password

Reet2010

Example Request
curl
curl --location 'http://localhost:8000/rest-auth/password/change/' \
--data-urlencode 'new_password1=abcde1234!' \
--data-urlencode 'new_password2=abcde1234!' \
--data-urlencode 'old_password=Reet2010'
200 OK
Example Response
json
{
  "detail": "New password has been saved."
}
Content-Type

application/json

Vary

Accept, Cookie

Allow

POST, OPTIONS

X-Frame-Options

DENY

Content-Length

41

Referrer-Policy

same-origin

Set-Cookie

sessionid=.eJxVjEEOwiAQRe_C2hChTKEu3XsGMsNMpWqogXZlvLs26UK3_733XyriuuS4NqlxYnVST6zq8LsSpruUDfENy3XWaS5LnUhvit5p05eZ5XHe3b-DjC1_ayJnybIEGNGx62Ew1qBgBz54PDJ0YFNiJOeY0PuRgHtrfEKQISSv3h-qYTmb:1kBwhJ:RxwrkSSNbD6jsjd9A-P6joNBZPjVszJ6FGNr9cYWS88; expires=Sat, 12 Sep 2020 08:58:53 GMT; HttpOnly; Max-Age=1209600; Path=/; SameSite=Lax

Server

Werkzeug/1.0.1 Python/3.8.2

Date

Sat, 29 Aug 2020 08:58:53 GMT