The Movie Database Support

How does one renew a guest session?

7 svar (på sida 1 av 1)

Jump to last post

Hi @connorricks, I don't believe guest sessions expire, so there is no need to renew one. The exception is if they go unused for the first 24 hours, then they expire. In that case you would have to request a new one.

The endpoint for creating a new session returns an expiry date which is roughly 6 months out.

This url now (7/16/2023 3:36pm cdt):

https://api.themoviedb.org/3/authentication/guest_session/new?api_key=xxxxxxxxxxxxxxxx

Returns this:

{"success":true,"guest_session_id":"xxxxxxxxxxxxxxxx","expires_at":"2023-07-17 20:36:47 UTC"}

Time is UTC which would make it 24 hours from now.

If you are getting something different then we will need to see what url you are using.

Guest sessions will automatically expire if they are not used within the first 60 minutes, that's what the expires_at field is denoting.

I'm not understanding. If I run the query it gives me a future date (without the timezone) of one day and 5 hours difference from my time. I'm in the US central timezone (CDT) so that accounts for the 5 hours difference. What happened to the one day?

If it's one hour then the previous example expires_at should say 2023-07-16 21:36:47 UTC, so maybe the expires_at is wrong?

Thanks for the context!

Hi @connorricks, sorry for the confusion. I would believe @travisbell since he likely wrote the code so a guest session token expires in one hour unless you use it. Then it is good for regular use. The expire date returned looks to be wrong so maybe a bug with that.

Kan du inte hitta en film eller tv-serie? Logga in för att skapa den.

Globala

s fokus på sökrutan
p öppna profilmenyn
esc stäng ett öppet fönster
? öppna tangentbordsgenväg fönstret

På mediasidor

b gå tillbaka (eller till förälder när det är tillämpligt)
e gå till redigerings sidan

På tv-säsongssidor

(höger pil) gå till nästa säsong
(vänster pil) gå till den föregående säsongen

På tv-avsnittssidor

(höger pil) gå till nästa avsnitt
(vänster pil) gå till föregående avsnitt

På alla bildsidor

a öppna lägg till bild fönstret

På alla redigeringssidor

t öppna översättnings väljaren
ctrl+ s skicka förmulär

På diskussionssidor

n skapa ny diskussion
w växla sedd-status
p växla offentligt/privat
c växla stäng/öppna
a öppna aktivitet
r svara på diskussionen
l gå till det senaste svaret
ctrl+ enter skicka ditt meddelande
(höger pil) nästa sida
(vänster pil) föregående sida

Inställningar

Vill du betygsätta denna artikel eller lägga till den i en lista?

Logga in