How to authenticate request in Django-rest-auth?

Viewed 1575

I am trying to integrate django-rest-auth package in my web application. So far i am able to register users, send password reset email and login using the API provided by django-rest-auth package.

Now when i send a login request, it returns "token" upon successful authentication.

How do i send authentication token in further requests? For example, i am trying to fetch user using GET /rest-auth/user but it is giving me a response Authentication credentials not provided. I have tried passing token via HTTP Basic Authentication (base64 encode token as username and leave password as empty). I am still not able to work.

Anyone knows how i am supposed to pass this token in requests?

2 Answers
Related