Reputation: 145
I am having problems creating users using the Keycloak REST API from my docker container running a Django application. The following works using postman:
The following does NOT work in python, and returns 401 Unauthorized:
I am using the exact same user credentials in both scenarios,and since I am able to get this to work in postman I don't think there's any problem with access/roles etc.
Any help is greatly appreciated. Thanks!
Upvotes: 0
Views: 687
Reputation: 19939
You are not givingspace after "Bearer" so instead of "Bearer"+ token , use "Bearer " + token
you can also geenrate python code from postman :
click code:
Search for python
copy paste the generated code
Upvotes: 2