[Vuejs]-Django REST Framework 401 error with Vue3

0👍

You have to pass authrization token headers of axios while calling the api if that is need autorized token

Like this

axios.get("/api/v2/user_info/" , { headers: {"Authorization" : `Bearer ${token}`} })
   .then(response => {
      this.users = response.data;
   .catch((error) => {
       console.log(error)
   });

Let me know if you still have a question

Thanks

Leave a comment