Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PYTHON

error 401 unauthorized "Authentication credentials were not provided."

#Make sure to have the permissions in your settings.py file like that:

REST_FRAMEWORK = {
'DEFAULT_PERMISSION_CLASSES': (
    'rest_framework.permissions.IsAuthenticated',
),
'DEFAULT_AUTHENTICATION_CLASSES': (
    'rest_framework_jwt.authentication.JSONWebTokenAuthentication',
),
}
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #error #unauthorized #credentials
ADD COMMENT
Topic
Name
8+3 =