Heya,
Yes I am using shell (bash) and kinda copy pasted it:
Code: Select all
# curl "https://www.opensubtitles.com/api/v1/login" -d '{"username": "falsyana", "password": "xxxxxxxxxxxxx"}' -X POST -H "Accept: application/json" -H "Content-Type: application/json"
{"message":"Error, Unauthorized","status":401}
(of course my username and password are replaced)
Also my application (written in PHP) gives the same error.
And yes it is clear that is for development only
hmm, that's really strange, I'm on the API all day long, it's working fine in my postman, and ruby apps.
But I got the same error with the shell now, copying exactly your command, but if I put the X POST as first argument it works
curl -X POST "
https://www.opensubtitles.com/api/v1/login" -d '{"username": "falsyana", "password": "xxxxxxxxxxxxx"}' -H "Content-Type: application/json" -H "Accept: application/json"
honeslty, I never use those, they are generated by the documentation tool, so thanks for pointing out these errors
For the PHP script, if you got a small script I can see, I'd be happy to check it out.
cheers