Replies: 2 comments 1 reply
-
Hi, both urls are Django forms and not REST API endpoints, so you cannot POST with username/password only but instead have to render the full form. I'm ready to open a PR that will include a few bacic urls that are missing (example a /whoami API showing info about the request, /api/login to authenticate and return a TOKEN, plus a few more). I'll make sure I add them on the Swagger documentation too - https://demo.mediacms.io/swagger/ Until then, maybe you may achieve what you're trying by providing the user/password credentials on each call, for example:
|
Beta Was this translation helpful? Give feedback.
-
@Dan1ell I've just merged #257 which adds these URLS, checkout on description and let us know if they work for you! |
Beta Was this translation helpful? Give feedback.
-
How to log into mediacms with the rest api?
I tested on the demo site as follows:
curl -X POST -d '{"username": "myusername", "password": "mypassword"}' -H 'Content-Type: application/json' https://demo.mediacms.io/api-auth/login/
But instead of the token I get CSRF verification failed.
Beta Was this translation helpful? Give feedback.
All reactions