def retrieve(self, request, pk=None):
    """
        If provided 'pk' is "me" then return the current user.
        """
if request.user and pk == 'me':
    return Response(UserSerializer(request.user).data)
return super(UserView, self).retrieve(request, pk)
Get Authenticated user from token in Django Rest Framework