Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Header field name: Authorization

Header field value: Token<SPACE><TOKENToken<SPACE><GENERATED_VALUE>TOKEN>


Example http header:

Code Block
Authorization: Token 2cdd70527c03ac18be79fc6a56ab11f857bd2ad9

...

Code Block
import requests
res = requests.get('http://127.0.0.1:8000/api/company/company/', headers=dict(Authorization='Token 2cdd70527c03ac18be79fc6a56ab11f857bd2ad9'))
print res.json()


Unlike user-based session authentication no CSRF token or session id is required for token based authentication.

Demo API integration

A demo API client is available at Demo API Client.

...