"""
Extend the TokenAuthentication class to support querystring authentication
in the form of "http://www.example.com/?auth_token=<token_key>\"
"""

def authenticate(self, request):
    if ('auth_token' in request.QUERY_PARAMS and 'HTTP_AUTHORIZATION' not in
        request.META):
        return self.authenticate_credentials(request.QUERY_PARAMS.get(
            'auth_token'))
Token in query string with Django REST Framework's TokenAuthentication