Plex - 429 Too Many Requests

Did some more playing... the 429 error is coming from the plex server.

The good news is that I manually edited the us.m3u8 and appear to have a working solution (been playing for about an hour now after failing in about a minute).

  • pointed the stream links to the plex server
  • added X-Plex-Product=Plex%20Web
  • added X-Plex-Session-Id=[new unique UUID]
  • generated a new X-Plex-Client-Identifer=[new 23 char alpha-numeric string]
  • generated a new X-Plex-Token=[need to generate from a Plex account]

It's the last one that I think really fixed things. Not sure how the token is currently being generated or if he's trying to use a static token.

cc @matthuisman

2 Likes

Been playing with this a couple of weeks ago and actually built a docker
Seems to be running rather well

docker run -d -p 7777:7777 --name vlc-bridge-plex jgomez177/vlc-bridge-plex

I would say I got it running but have done nothing around guide data.
Plus mine is only US not international like the one on i.mjh.nz

5 Likes

Updated the docker to utilize the
https://i.mjh.nz/Plex/us.xml.gz
EPG Guide Data

2 Likes

I took the easy way out....set a cron job to run a little script to download the i.mjh.nz/Plex files, run a couple of sed commands to reformat the stream urls/insert my unique data and then update the DVR server. The DVR Plex source now points to local files for the m3u8 and xml files.

Been working perfectly.

Would you be willing to share that setup for those of us less technically savvy?

1 Like

Do you might outlining how it works? Also, is there a /config or some other directory mapping for appdata?

Thanks, I have been pulling out what little hair I have left over this on another platform.

I went the sed route:

here is the script:

#!/bin/sed -f
#
# Make executable via chmod +x <scriptname>
#
# <scriptname> Plex-all.m3u8 > new-playlistname
#

#
s;https://i.mjh.nz/Plex/\(.*\);https://epg.provider.plex.tv/library/parts/\1?X-Plex-Client-Identifier=xgkz9ui5tipdsflhzmh1ar3h\&X-Plex-Client-Platform=Chrome\&X-Plex-Token=YOUR-PLEX-TOKEN-HERE;
1 Like

I've been working to try and simplify things as much as possible. Came up with two scripts...
A run once script to generate user unique data for Plex, and register Channels DVR as an app with Plex access.
A second script to take that data and update the i.mjh.nz files. It's currently set up for 'us' only, but could be edited to pull another set of data.

I'll try and get it up somewhere later today. But....I'm a Linux guy, haven't really touched Windows in a long time. Especially to try and translate the bash script into bat/cmd.

1 Like

This would be awesome. Running Channels as a container in Unraid, so I can likely use User Scripts to schedule this, too.

I made an attempt.....the scripts are up on gist

4 Likes

Thanks for doing that. I guess I need it dumbed down some more. I get a plexdata file with the USERID,SESSIONID, and CLIENTID, but TOKEN line is empty. When I click on the plextoken file it's empty. It's not easy for me to pass runtime arguments using Unraid's User Scripts plugin, so I just set USERID and PASSWD as variables in the script. Maybe that's the issue. Not sure, I'll keep trying.

1 Like

Does you plex password have any special characters in it?

Yes. It was my theory that was an issue, but as they require at least one special character now I thought that might be noted. Sounds like I got bit by assumptions? :slight_smile: Guess I'll work on figuring out the correct encoding to try it out.

I've had plex for a long time and my pw doesn't have special characters....I thought about that and hoped for the best :frowning_face:

Let me see if can figure it out.

That thought also crossed my mind, LOL. My main account has 2FA and that stumped me first, so I created a new account as I just watch streams - Jellyfin is my main media server. So yeah, I think it is a newer requirement.

1 Like

What you may try is escaping the chars yourself. Insert a backslash \ before each special character.

That generated a token - THANK YOU!

Great! I'll work on an update.

EDIT:
Turns out there was a simple fix....just the instructions updated
Syntax:
USERID='[your plex email]' PASSWD='[your plex passwd]' [path_to_script/plextoken.sh]
Note that your email and passwd must be placed in single quotes to ensure correct handling of special characters

EDIT:
Also added a check for a failed attempt to obtain a token

1 Like

Got the PlexIPTV.sh script working first try after you helped me with this. I just finished watching Plex for about 5 minutes - something I haven't been able to do for several days to a couple of weeks.

1 Like

Thanks for testing this out! Appreciate it.
If anything else comes up i'll be periodically checking this thread.

1 Like