Trakt token expiry (1 Viewer)

brain1000

Portal Member
November 25, 2012
18
7
Home Country
Great Britain (UK) Great Britain (UK)
Does anyone still use Trakt with MP1 ? Since earlier this year it seems that Trakt expires their tokens every 24 hours which causes Trakt within MP1 to stop working. (I am using V6.0.5.364)

Has anyone found a workaround - other than authorising the app every day?

Brian
 

doskabouter

Development Group
  • Team MediaPortal
  • September 27, 2009
    4,990
    3,711
    Nuenen
    Home Country
    Netherlands Netherlands
    eh hm, that could explain yesterday's miss of a watched movie.
    I indeed use it quite a lot and didn't realize this. Don't have a solution (yet) though

    Edit: just checked trakt logfile and it seems it successfully logged in (last time I authorized it it was at least 3 days ago)
    Using the same version as you. do you still have usessl=no? because that stopped working a couple of days ago. setting it to yes (in mediaportal.xml as I was too lazy to try find that option in the UI) and authorize again did the trick
    Not sure though what happend with yesterdays movie, for now I'll write it off as a fluke

    Edit2: I refresh the Token, but i get 90 days
     
    Last edited:

    ajs

    Development Group
  • Team MediaPortal
  • February 29, 2008
    16,851
    12,105
    Kyiv
    Home Country
    Ukraine Ukraine

    Successful authorization. When you receive a 200 success response, save the access_token so your app can authenticate the user in methods that require it. The access_token is valid for 24 hours. Save and use the refresh_token to get a new access_token without asking the user to re-authenticate. It's normal OAuth from this point.

     

    ajs

    Development Group
  • Team MediaPortal
  • February 29, 2008
    16,851
    12,105
    Kyiv
    Home Country
    Ukraine Ukraine
    I saw on the Trakt forum that the API incorrectly returns the token expiration date, not 86400 (24 hours) but still 90 days, I need to look in the log file (I'm not at home now), if this is so, then we'll add a hack, and it should work.
     

    doskabouter

    Development Group
  • Team MediaPortal
  • September 27, 2009
    4,990
    3,711
    Nuenen
    Home Country
    Netherlands Netherlands
    i now see this in the logfile (been at least 3 days since i authorized it):
    2025-09-15 16:00:36.195 [INFO] [CheckConnection][27]: The trakt access token has now expired as of 14/09/2025 12:48:30, requesting refresh token
     

    doskabouter

    Development Group
  • Team MediaPortal
  • September 27, 2009
    4,990
    3,711
    Nuenen
    Home Country
    Netherlands Netherlands
    yes that did work in the end.
    lost the exact log but now I see
    2025-09-15 16:25:41.968 [INFO] [CheckConnection][28]: Logging into trakt.tv
    2025-09-15 16:25:41.971 [DEBG] [CheckConnection][28]: Address: https://api.trakt.tv/users/settings
    2025-09-15 16:25:42.220 [DEBG] [CheckConnection][28]: Response: {"user":{"username": etc
    2025-09-15 16:25:42.221 [INFO] [CheckConnection][28]: User <redacted> successfully signed in and retrieved online settings from trakt.tv
     

    Users who are viewing this thread

    Top Bottom