Django Rest Framework Postman Token Authentication

psychok7 picture psychok7 · Oct 28, 2014 · Viewed 12.8k times · Source

I am using Django Rest Framework Token authentication and if i do curl http://localhost:8000/api/v1/users/?format=json -H 'Authorization: Token 0a813fdcd3f8846d6fa376f2592bbc678b0b8e85' everything works fine.

But when i try to achieve that with Postman chrome client it nothing happens. What am i doing wrong??

enter image description here

Answer

Kevin Brown picture Kevin Brown · Oct 28, 2014

You are setting the header to Authorization: Token when it really should just be Authorization. The header is actually just Authorization, but the value is Token [token_string], where [token_string] is the authorization token that you have obtained.