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.
bleaklodge
Posts: 3
Joined: Tue Nov 28, 2023 2:03 am

.com API: How long should a user's log-in token be kept?

Tue Nov 28, 2023 2:12 am

In other words, every how often should I destroy the token (logout) and generate a new one via login?

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

Re: .com API: How long should a user's log-in token be kept?

Tue Nov 28, 2023 5:39 pm

In other words, every how often should I destroy the token (logout) and generate a new one via login?
up to you... destroying the tokens is not needed, you can just leave them expire.

bleaklodge
Posts: 3
Joined: Tue Nov 28, 2023 2:03 am

Re: .com API: How long should a user's log-in token be kept?

Tue Nov 28, 2023 6:11 pm

That's my question, how long do they last? I want to know so that I cache the token for x amount of time and renew when needed, to avoid unnecessary login calls to the API.

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

Re: .com API: How long should a user's log-in token be kept?

Tue Nov 28, 2023 6:57 pm

JWT is returned, you can check its validity via jwt.io

JWT is valid for 24 hours.

I updated docs as well

https://opensubtitles.stoplight.io/docs ... cc0a-login


Return to “Developing”

Who is online

Users browsing this forum: No registered users and 31 guests