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.
Acoslavisa
Posts: 3
Joined: Tue May 12, 2020 6:47 pm

Re: [OS] API only for logged users

Tue May 12, 2020 7:08 pm

I recently registered an account/user agent for programmatically downloading subtitles for movies/TV shows (hobby project, just for me basically). I was using the API over at https://rest.opensubtitles.org/search .

Both the email and the post here say that the login request needs opensubtitles.org username and password. What actually happened for me is that I kept getting "401 Unauthorized" error, and I needed to create a new account over at opensubtitles.com .. Just noting that in case anyone else stumbles over that as well..

My main question(s): what's the relation between APIs at https://rest.opensubtitles.org/ and https://www.opensubtitles.com/api/ ?

Is the first one deprecated now?
Should I use the second one to get the authorization token that I should use when interacting with the first one?
Will I get banned if I keep using the first one without any authorization (the email says so, so I parked my little util until I made sure I was playing fair :))

Thanks in advance and thanks for everything you are doing here!

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

Re: [OS] API only for logged users

Wed May 13, 2020 6:36 am

Hi

yes, maybe it is time to get things into order:

1) api.opensubtitles.org/xml-rpc - this was first API introduced back in time and it is still main API used. Back in time there was 2 technologies - xml and json. We should make it into JSON obviously, but we choose XML over it. Not the most clever idea, but in that time it had a lot of sense to pick it up. This API is communicating with opensubtitles.org servers. This will be depreciated in future over .com REST api.

2) rest.opensubtitles.org - as subdomain suggest it is simple REST API, basically used for caching on Cloudflare, it supports minimal functions, but it can be used, it uses opensubtitles.org servers. This will be depreciated in future over .com REST api.

3) www.opensubtitles.com/api/ - this is our new DEVELOPMENT API, not ready for production, still work in progress, API endpoints will change, it is open for comments from developers - what we can make better. In future this will be our main API. It is using opensubtitles.com services, so if you want to use this one, you have to import your account from .org to .com or register new one.

to be clear:
www.opensubtitles.org is using own user system (account are not shared with other services)
www.opensubtitles.com is using own user system (account are not shared with other services - so one have to IMPORT his account)
forum.opensubtitles.org is using own user system (account are not shared with other services)

I hope this helps and maybe we can make this announcement/explanation sticky.

Acoslavisa
Posts: 3
Joined: Tue May 12, 2020 6:47 pm

Re: [OS] API only for logged users

Wed May 13, 2020 9:56 am

Thanks! It clarifies a fair bit. Where does that leave us regarding the new authentication mechanism? Is it mandatory only for those interacting with the API over http://www.opensubtitles.com/api/ ?

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

Re: [OS] API only for logged users

Wed May 13, 2020 10:39 am

not sure which one you mean.

But now ALL APIs (except rest.opensubtitles.org) require authentication, and also REST actually should be authenticated...

for most stable experience use xml-rpc for now

Acoslavisa
Posts: 3
Joined: Tue May 12, 2020 6:47 pm

Re: [OS] API only for logged users

Wed May 13, 2020 11:45 am

Got it, thanks!

Quaries
Posts: 1
Joined: Thu Jul 09, 2020 12:58 pm
Contact: Website Facebook Twitter

Re: [OS] API only for logged users

Thu Jul 09, 2020 2:24 pm

Hello! I have a doubt.
I entered my user and password in PopCorn application and still without working.
It took some time? How it works.
Thank you!

Yes recently this was the issue, that even after adding the username and password subtitles was not working. But may be they fixes the error soon in the next update.

so if you are still facing the issue then please go and check for the update.

Another solution

You can use the custom Subtitles with VLC player and it works all the time.

Play the video in Popcorn Time with the VLC
Just go to the subtitles
Tap “add subtitles file”
Now go the downloaded subtitles file and then choose the srt file

All done,

And it always works 100% for me

Source

User avatar
vankasteelj
Posts: 175
Joined: Sun Nov 15, 2015 1:09 am

Re: [OS] API only for logged users

Sat Feb 20, 2021 2:48 pm

Hi there, should I make Opensubtitles-Uploader "log-in only" then? It's been optionnal from start, but if app interaction through the API needs to be as a logged-in user, I can make that more clear on my end, with a popup to log-in at start or "grey out" the app while not logged-in for example.

Same could be said for my opensubtitles-api nodeJS library on NPM, used by a fair number of developpers. If log-in is mandatory, I could indicate it in the docs and/or refuse calls if not user is logged at a code-level on the end-user's side.

I always log in, so I was unaware of this change (maybe I got a mail? I don't recall). Let me know, thanks

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

Re: [OS] API only for logged users

Sat Feb 20, 2021 5:04 pm

Hi

we sent emails about this. Anyway we have list where we allow anonymous usage, one of them is opensubtitles uploader, so there is no need to change.

For node JS - yes, over there would be great to tell people it is only for logged-in users and if somebody needs to use it for non-logged in, they can contact us for pricing. Also we allowed CORS, so it can be used directly on website.

Next thing, did you have a look on our new API ? https://www.opensubtitles.com/docs/api/html/index.htm

User avatar
vankasteelj
Posts: 175
Joined: Sun Nov 15, 2015 1:09 am

Re: [OS] API only for logged users

Sat Feb 20, 2021 5:12 pm

OK thanks. It's updated in the online readme, it'll be also on NPM as of the next iteration (no idea when): https://github.com/vankasteelj/opensubt ... uick-start

No I havent yet seen the api but rest is good (XML is a pain). Ill check it out, maybe fork opensubtitles-api nodejs library to use REST api to be up-to-datish when/if it gets out of beta

Return to “Programs using OS”

Who is online

Users browsing this forum: Ahrefs [Bot] and 25 guests