mikasaloli i did test on localhost using postman than post data to http://localhost:8888/public/api/users with json with corrected username and password { "identification": "admin", "password": "12345678" } and it return { "errors": [ { "status": "400", "code": "csrf_token_mismatch" } ] } any idea how to fix this?
Scumi Hello. I had this issue as well: https://discuss.flarum.org/d/20867-csrf-token-mismatch-on-beta-9-upgrade/13 In short: this is a bug, introduced on beta-9 and will be fixed on beta-10 (as far as I know). For a workaround, have a look into the linked thread above. Edit: Github issue for reference: flarum/core1828
dk2000 Hello I have version 0.1.0-beta.10, and I still getting the same error when I try to get the token: Request: http https://myforum/api/token identification=admin password=pass Response: { "errors": [ { "code": "csrf_token_mismatch", "status": "400" } ] }
luceos dk2000 the best way to authorize with Flarum from the outside is using a master token, see https://github.com/flagrow/flarum-api-client#configuration
dk2000 luceos Thanks for the link 😃 . But what if I don't have access to the database? The option I have described above it won't be valid anymore?