Questions about myPlex Auth Token.

I'm implementing the myPlex in my Client (emplexer), would like to take some questions about the access token.

1) I wonder how long this token is valid?
2) Should I be using the same token until at some point it is invalid, the process for renewing the token? I'll need to login again?
3) If I do not have a way to simply renew the token i have to do the pin login again?

Thanks to anyone who can help me.

I also would like to know the expiration date on the authentication token, whether that be for the client (PHT, PMC, PleXBMC, Plex for iPhone, Plex for Android) or Web (Chrome, Safari, Firefox, Internet Explorer).

My guess is it lasts forever. I say this because if you take a look at your Preferences.xml (or windows registry) You'll notice there is an AuthToken there that is generated upon server setup.

Also, if you take a look at the PMS Proxy I created called RunTellThat it uses a config set AuthToken. I have been using RTT in production to share channels to 10 people or so for a couple of months now and it has not stopped working which means the AuthToken is still valid.

If you are worried about this, simply re-authenticate if you receive a 404 response using the information in the unofficial web API guide.

Can we get a specific answer to this from a developer? I am attempting to update the myPlex API support in couchpotato and need to know if it is necessary to re-validate the Auth Token after a certain period of time.

Would it be prudent to re-login with login/pass authentication and retrieve the Auth Token on application launch only?

If the application is run on a server continuously (24/7/365), will the token expire after a period of time and cause authentication issues if not checked for validity?

I can accept that I can add a check to re-authenticate on a 404 error, as previously stated, but would like to know if there is a specific validity period to expire the Token...

It appears that the token mechanism has changed recently. The token always used to be static and never changed but now I've noticed the token changes quite often (noticed it changing at least 3 times within one hour the other day).

This makes a lot more sense but any third party apps not taking this into account are most likely now broken.

It appears that the token mechanism has changed recently. The token always used to be static and never changed but now I've noticed the token changes quite often (noticed it changing at least 3 times within one hour the other day).

This makes a lot more sense but any third party apps not taking this into account are most likely now broken.

Not so.....Currently, when a token is issued, it has no limit on it's lifespan

If this is to change in the future, only the Mighty Barkley can say, but personally hope so

/T

Not so.....Currently, when a token is issued, it has no limit on it's lifespan

If this is to change in the future, only the Mighty Barkley can say, but personally hope so

/T

Ah ok. Something definitely did change though, maybe when I activated PlexHome.

I'm seeing a lot of different super tokens lately, I'm sure it wasn't always like this.

Dec 20, 2014 11:17:21 [0x7f16eabff700] DEBUG - We found auth token (eYCZgu4DP9h#########), enabling token-based authentication.
Dec 20, 2014 11:17:24 [0x7f16ea23b700] DEBUG - We found auth token (w3uQtimVL7y#########), enabling token-based authentication.
Dec 20, 2014 11:17:30 [0x7f16eabff700] DEBUG - We found auth token (w3uQtimVL7y#########), enabling token-based authentication.
Dec 20, 2014 11:17:33 [0x7f16ea23b700] DEBUG - We found auth token (w3uQtimVL7y#########), enabling token-based authentication.
Dec 20, 2014 11:17:33 [0x7f16dca3b700] DEBUG - We found auth token (w3uQtimVL7y#########), enabling token-based authentication.
Dec 20, 2014 11:17:36 [0x7f16eabff700] DEBUG - We found auth token (w3uQtimVL7y#########), enabling token-based authentication.
Dec 20, 2014 11:17:36 [0x7f16dca3b700] DEBUG - We found auth token (eYCZgu4DP9h#########), enabling token-based authentication.
Dec 20, 2014 11:17:41 [0x7f16ea23b700] DEBUG - We found auth token (w3uQtimVL7y#########), enabling token-based authentication.
Dec 20, 2014 11:17:47 [0x7f16eabff700] DEBUG - We found auth token (w3uQtimVL7y#########), enabling token-based authentication.
Dec 20, 2014 11:17:51 [0x7f16ea23b700] DEBUG - We found auth token (eYCZgu4DP9h#########), enabling token-based authentication.
Dec 20, 2014 11:17:53 [0x7f16eabff700] DEBUG - We found auth token (w3uQtimVL7y#########), enabling token-based authentication.
Dec 20, 2014 11:17:59 [0x7f16ea23b700] DEBUG - We found auth token (w3uQtimVL7y#########), enabling token-based authentication.
Dec 20, 2014 11:18:01 [0x7f16eabff700] DEBUG - We found auth token (zRMBDrFTPpD#########), enabling token-based authentication.
Dec 20, 2014 11:18:01 [0x7f16ea23b700] DEBUG - We found auth token (zRMBDrFTPpD#########), enabling token-based authentication.
Dec 20, 2014 11:18:05 [0x7f16eabff700] DEBUG - We found auth token (w3uQtimVL7y#########), enabling token-based authentication.
Dec 20, 2014 11:18:06 [0x7f16ea23b700] DEBUG - We found auth token (eYCZgu4DP9h#########), enabling token-based authentication.
Dec 20, 2014 11:18:11 [0x7f16eabff700] DEBUG - We found auth token (w3uQtimVL7y#########), enabling token-based authentication.

Ah ok. Something definitely did change though, maybe when I activated PlexHome.

I'm seeing a lot of different super tokens lately, I'm sure it wasn't always like this.

With Home mode, every app/util/device that access PMS, should have it's own token.

Only agents/bundles that is running locally, towards the loopback addy of 127.0.0.1, and is solely using the framework, could do without

https://forums.plex.tv/topic/129922-how-to-request-a-myplex-token-for-your-app/

/T

Ok, so basically any third party app should login once to obtain a token. That token should be saved and used indefinitely, and only upon a 401/403 authentication error should re-login to obtain a new token. Logging in via myPlex once on application launch should return the same token (I'm assuming), and would not be considered bad practice?

That's what I thought initially...

Is the only way to revoke a token is to remove the access from the "Devices" via plexWeb or some parallel API call?

Sadly don't know of any API calls  :(

/T

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.