CLI:
curl --request POST --silent -vvv --url "https://api.opensubtitles.com/api/v1/login" -H "Api-Key: <MYKEY>" -A "User-Agent: shenshou v1" -H "Content-Type: application/json" --data '{"username": "redguardtoo", "password": "mypassword"}'
Response:
* Trying [2606:4700:ac43:d994]:443...
* Connected to api.opensubtitles.com (2606:4700:ac43:d994) port 443 (#0)
* ALPN: offers h2,http/1.1
* TLSv1.3 (OUT), TLS handshake, Client hello (1):
* CAfile: /etc/ssl/certs/ca-certificates.crt
* CApath: /etc/ssl/certs
* TLSv1.3 (IN), TLS handshake, Server hello (2):
* TLSv1.3 (IN), TLS handshake, Encrypted Extensions (8):
* TLSv1.3 (IN), TLS handshake, Certificate (11):
* TLSv1.3 (IN), TLS handshake, CERT verify (15):
* TLSv1.3 (IN), TLS handshake, Finished (20):
* TLSv1.3 (OUT), TLS change cipher, Change cipher spec (1):
* TLSv1.3 (OUT), TLS handshake, Finished (20):
* SSL connection using TLSv1.3 / TLS_AES_256_GCM_SHA384
* ALPN: server accepted h2
* Server certificate:
* subject: CN=opensubtitles.com
* start date: Mar 29 21:00:40 2024 GMT
* expire date: Jun 27 21:00:39 2024 GMT
* subjectAltName: host "api.opensubtitles.com" matched cert's "*.opensubtitles.com"
* issuer: C=US; O=Google Trust Services LLC; CN=GTS CA 1P5
* SSL certificate verify ok.
* using HTTP/2
* h2h3 [:method: POST]
* h2h3 [:path: /api/v1/login]
* h2h3 [:scheme: https]
* h2h3 [:authority: api.opensubtitles.com]
* h2h3 [user-agent: User-Agent: shenshou v1]
* h2h3 [accept: */*]
* h2h3 [api-key: 9PEmFOnb2IzOHAbpbwRWcll01IsIjfFz]
* h2h3 [content-type: application/json]
* h2h3 [content-length: 52]
* Using Stream ID: 1 (easy handle 0x558004591a60)
> POST /api/v1/login HTTP/2
> Host: api.opensubtitles.com
> user-agent: User-Agent: shenshou v1
> accept: */*
> api-key: 9PEmFOnb2IzOHAbpbwRWcll01IsIjfFz
> content-type: application/json
> content-length: 52
>
* We are completely uploaded and fine
* TLSv1.3 (IN), TLS handshake, Newsession Ticket (4):
* TLSv1.3 (IN), TLS handshake, Newsession Ticket (4):
* old SSL session ID is stale, removing
< HTTP/2 403
< date: Tue, 23 Apr 2024 07:16:01 GMT
< content-type: text/plain; charset=UTF-8
< content-length: 16
< x-frame-options: SAMEORIGIN
< referrer-policy: same-origin
< cache-control: private, max-age=0, no-store, no-cache, must-revalidate, post-check=0, pre-check=0
< expires: Thu, 01 Jan 1970 00:00:01 GMT
< report-to: {"endpoints":[{"url":"https:\/\/a.nel.cloudflare.com\/report\/v4?s=ESpJ6fix8pnijI2CmnJdljuSgIkWwH7qfJdV%2F2G1NqcvUWKI6vdLDv%2BqF1wHncQa%2FJ7%2BVLKEBCHGVFAx5Gdbu%2F7GTDimIxL4ZvywIHSmzLedSabIztP4Wxxac3WZzte2LbTgQKANm5bIOVo4QMQcwh5xzJg%3D"}],"group":"cf-nel","max_age":604800}
< nel: {"success_fraction":0,"report_to":"cf-nel","max_age":604800}
< strict-transport-security: max-age=15552000; includeSubDomains; preload
< x-content-type-options: nosniff
< server: cloudflare
< cf-ray: 878c10d77fd4a7f3-SYD
< alt-svc: h3=":443"; ma=86400
<
* Connection #0 to host api.opensubtitles.com left intact
error code: 1010