Hi everyone I am the beginner django back end developer.

48 views
Skip to first unread message

Balaji V

unread,
Feb 13, 2025, 10:01:42 AMFeb 13
to Django developers (Contributions to Django itself)
while working inside the project I getting the error for generating the token. the error was shown {
    "detail": "Authentication credentials were not provided."
}
how to fix this error to get the token from the login api of the website

Miky Rola

unread,
Feb 13, 2025, 10:15:01 AMFeb 13
to django-d...@googlegroups.com, balajivinot...@gmail.com
Hi Balaji, 
 Make sure you are correctly sending credentials (e.g., username and password) to the login endpoint. Typically, the request should be something like:  
curl -X POST "https://yourapi.com/api/login/" \
     -H "Content-Type: application/json" \
     -d '{"username": "username", "password": "password"}'
regards,
miky

--
You received this message because you are subscribed to the Google Groups "Django developers (Contributions to Django itself)" group.
To unsubscribe from this group and stop receiving emails from it, send an email to django-develop...@googlegroups.com.
To view this discussion visit https://groups.google.com/d/msgid/django-developers/80e1a208-ec66-42de-9762-11f8d97ce75fn%40googlegroups.com.
Reply all
Reply to author
Forward
0 new messages