shrey
1
When calling (POST call) the above endpoint to get a user’s token, i get the error:
{"detail":"Method \"GET\" not allowed."}
Also, i noticed, in Postman, that the original POST call was getting redirected to a GET call. Is this intended or a bug or some other issue?
Self-hosted on DO via https://baserow.io/docs/installation%2Finstall-with-docker-compose
shrey
3
Update:
Experienced the same issue with a database on baserow.io
shrey
4
Any feedback regarding this bug?
nigel
5
Hey @shrey ,
Sorry for the delay.
Can you tell me the exact endpoint you are querying? Are you perhaps querying without a trailing slash?
shrey
6
Hi @nigel ,
this is the request:
curl --location --request POST 'https://api.baserow.io/api/user/token-auth' \
--header 'Content-Type: application/json' \
--data-raw '{
"username": "my-username",
"password": "my-password"
}'
shrey
7
Just tried, it does work with the trailing slash.
nigel
8
Glad that it works. I’ve created this issue to track this as I think we could make the API experience a bit nicer than what happens currently when a trailing slash is missed: API access with trailing slash should give nicer error or just work (#892) · Issues · Bram Wiepjes / baserow · GitLab
1 Like