Forum rules
Under no circumstances is spamming or advertising of any kind allowed. Do not post any abusive, obscene, vulgar, slanderous, hateful, threatening, sexually-orientated or any other material that may violate others security. Profanity or any kind of insolent behavior to other members (regardless of rank) will not be tolerated. Remember, what you don’t find offensive can be offensive to other members. Please treat each other with the kind of reverence you’d expect from other members.
Failure to comply with any of the above will result in users being banned without notice. If any further details are needed, contact: “The team” using the link at the bottom of the forum page. Thank you.
nsgr
Posts: 6
Joined: Tue Jan 11, 2022 10:39 pm

Re: Open subtitles API download issue

Thu Jan 13, 2022 6:57 pm

Update :
I was so confused cuz i got the problem again. Then i downloaded the python api to see if it get the same error and i got no error...
I compared the requests made by the python api and my curl requests and i found the difference.
The Bearer wasn't the problem. I had to use "https://www.opensubtitles.com/api/v1/download" instead of "https://api.opensubtitles.com/api/v1/download".
I'm not sure why the subdomain "api.opensubtitles.com" results in a 500 Error on the download link for me.

Just wanted to share my experience if others have the same problem.

User avatar
oss
Site Admin
Posts: 5338
Joined: Sat Feb 25, 2006 11:26 pm
Contact: Website

Re: Open subtitles API download issue

Fri Jan 14, 2022 6:32 am

I can not confirm this. Actually it seems "Bearer" is optional, it can be there, but doesn't have to be (for standard, we are putting it there and it SHOULD be there). Try with different file_id and play a bit and I hope you will confirm this

nsgr
Posts: 6
Joined: Tue Jan 11, 2022 10:39 pm

Re: Open subtitles API download issue

Sun Jan 16, 2022 6:28 pm

I can not confirm this. Actually it seems "Bearer" is optional, it can be there, but doesn't have to be (for standard, we are putting it there and it SHOULD be there). Try with different file_id and play a bit and I hope you will confirm this
Yes, "Bearer" wasn't the problem as stated in my update post. It wasn't working because i used "https://api.opensubtitles.com/api/v1/download". I had to use "https://www.opensubtitles.com/api/v1/download". Not sure why i get the 500 Error with the api.opensubtitles Subdomain tho.

os_dev
Posts: 139
Joined: Wed Oct 17, 2018 3:42 pm

Re: Open subtitles API download issue

Sun Jan 16, 2022 7:29 pm

I can not confirm this. Actually it seems "Bearer" is optional, it can be there, but doesn't have to be (for standard, we are putting it there and it SHOULD be there). Try with different file_id and play a bit and I hope you will confirm this
Yes, "Bearer" wasn't the problem as stated in my update post. It wasn't working because i used "https://api.opensubtitles.com/api/v1/download". I had to use "https://www.opensubtitles.com/api/v1/download". Not sure why i get the 500 Error with the api.opensubtitles Subdomain tho.
need to track the problem further, "Bearer" is required as described in the docs, and the url to be used must be api.opensubtitles.com, www.opensubtitles.com only work to access the api temporarily and will be disabled in time, so better solve it now.

may I ask, what are you using for testing ?

nsgr
Posts: 6
Joined: Tue Jan 11, 2022 10:39 pm

Re: Open subtitles API download issue

Sun Jan 16, 2022 10:54 pm

I can not confirm this. Actually it seems "Bearer" is optional, it can be there, but doesn't have to be (for standard, we are putting it there and it SHOULD be there). Try with different file_id and play a bit and I hope you will confirm this
Yes, "Bearer" wasn't the problem as stated in my update post. It wasn't working because i used "https://api.opensubtitles.com/api/v1/download". I had to use "https://www.opensubtitles.com/api/v1/download". Not sure why i get the 500 Error with the api.opensubtitles Subdomain tho.
need to track the problem further, "Bearer" is required as described in the docs, and the url to be used must be api.opensubtitles.com, www.opensubtitles.com only work to access the api temporarily and will be disabled in time, so better solve it now.

may I ask, what are you using for testing ?
I'm just using a small bash script with curl for testing. I just changed the URL back to api.opensubtitles and it works. Maybe it was a typo on my end.
I'm sorry about the confusion and thanks for the help!

User avatar
oss
Site Admin
Posts: 5338
Joined: Sat Feb 25, 2006 11:26 pm
Contact: Website

Re: Open subtitles API download issue

Mon Jan 17, 2022 10:06 am

www.opensubtitles.com SHOULDN'T be used for any API requests.

Return to “Developing”

Who is online

Users browsing this forum: Google [Bot] and 1 guest