2👍
✅
Pass the CSRF token to Django, or disable CSRF on the view handling the request.
from django.views.decorators.csrf import csrf_exempt
from django.http import HttpResponse
@csrf_exempt
def my_view(request):
return HttpResponse('Hello world')
Source:stackexchange.com