I had been using Django and it's powerful templates for quite some time but suddenly I had to Switch to the Front End languages and technology (completely different and new) that includes JavaScript, jQuery and AJAX. I want to access my API data at the front end using HTML,CSS,Javascript,Ajax,jQuery (whichever combination is suitable)
I am able to get my data and manipulate it easily without any difficulties using jquery and Ajax by using simple $.ajax()
method but the problem is that I do not have any clue about how to get the data that requires permissions?
{
"detail": "Authentication credentials were not provided."
}
What is the procedure to access this data? I am using Token Authentication provided to each user. How can I access the Token if I am not using Python and Django views at the front End? DO I have to login with every request? What is the actual Procedure? Can Someone Guide me through it?
According to Documentations, I am supposed to put the token in header. but How would I get the Token from DB and access it for every user and with every request?