Problem with sending POST request in Test.py using token authentication in DRF #8150
Unanswered
minifisk
asked this question in
Question & Answer
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
I'm facing problems doing POST requests when using Token authentication with DRF.
Setting up a user
I would like to get the auth-token from my authorization endpoint:
The username and password equals what I've set for the user when creating it, and response.json equals:
{'non_field_errors': ['Unable to log in with provided credentials.']}
Also, when I've managed to get the token, how would I go about to send a post request to some of my other endpoints where I need to be authenticated?
Beta Was this translation helpful? Give feedback.
All reactions