Browsertrix Cloud API Help

I’m attempting to write some bash scripts that will be leveraging curl to perform some API operations within Browsertrix Cloud. I have it locally deployed without SSL/TLS security. I see that the login/authentication is application/x-www-form-urlencoded content-type. WIth that being said, I have my URL crafted and I keep getting …

Method not supported

… in response. This what I’m submitting. Additionally, I’ve inspected the POST request through Firefox’s developer tools and this all checks out.

curl --header “Content-Type: application/x-www-form-urlencoded”
–request POST http://localhost:30870/api/auth/jwt/login?username=email?password=pw

Or I’ll get:

{“detail”:[{“loc”:[“body”,“username”],“msg”:“field required”,“type”:“value_error.missing”},{“loc”:[“body”,“password”],“msg”:“field required”,“type”:“value_error.missing”}]}

I’m scratching my head what I’m missing. Please help. Thanks.

Disregard found out my issue! :smile:

curl -X POST -F “username=email” -F “password=pw” http://localhost:30870/api/auth/jwt/login

1 Like