5👍
✅
By default rest_framework.authentication.TokenAuthentication
uses the keyword Token
instead of Bearer
. The call should be:
axios.get('http://localhost:8000/api/v1/rest-auth/user/', {headers: { 'Authorization': `Token ${token}`}})
Source:stackexchange.com