[Answer]-TokenAuthentication: Not able to authenticate

1👍

You are missing the TokenAuthentication backend in

'DEFAULT_AUTHENTICATION_CLASSES': (
        'rest_framework.authentication.BasicAuthentication',
        'rest_framework.authentication.SessionAuthentication',
    )

Just add the rest_framework.authentication.TokenAuthentication line. Keep in mind that the order matters as authentication backends are sequentially tested.

👤argaen

Leave a comment