-
Notifications
You must be signed in to change notification settings - Fork 7
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Issue when getting followed channels #9
Comments
Hey @Kperroch, I just retested and verified that, with a good Client ID and Client Secret, the API still behaves properly. I see these suggestions from the Twitch API library. Could the problem be number 3? These are often the same, but not always. The actual ID should be in the URL of your page. EDIT: Actually, this part seems to indicate that the user lookup was successful, but that the user doesn't follow any channels. Is that true? |
Is the issue the account follow more than 10 other channels and as if the Client ID was incorrect the Api couldn't bi able to retrieve the user EDIT : I think the log display 0 channel because of the issue above where it is saying : "The resource you tried to access was not valid" |
Hmm, you may be right. It's hard to tell because every call goes through I just pushed a new version with a tiny bit of extra logging to see exactly which API call is failing. Can you try it? |
Thank you! I do see the thing I added which is the method being invoked. In both cases, it's It's not clear to me what's going on here, as this works for me and others. Is the username that you put in Any chance you'd want to DM me your username for me to try on my system? If not I totally understand. Sorry about this! |
Just sent you an email |
Hey there! It seems like I have exactly the same issue. |
|
@Kperroch Thanks! With your username, I was able to discover a different bug. (When converting However your and @styler2go's problem is clearly before that, when first looking up the Would either of you be willing to run direct Twitch API commands? These work on PowerShell for Windows (I can write them for bash if needed). First, use your Client ID and Client Secret to retrieve an AccessToken. (iwr -method post "https://id.twitch.tv/oauth2/token?client_id=YOURCLIENTID&client_secret=YOURCLIENTSECRET&grant_type=client_credentials&scope=user:read:subscriptions").Content You should get a response like this. {"access_token":"YOURACCESSTOKEN","expires_in":5203151,"scope":["user:read:subscriptions"],"token_type":"bearer"} Then make a request like this to get your user's ID. (iwr -method get https://api.twitch.tv/helix/users?login=YOURUSERNAME -header @{"client-id" = "YOURCLIENTID"; "Authorization" = "Bearer YOURACCESSTOKEN" }).Content Finally, using the (iwr -method get https://api.twitch.tv/helix/users/follows?from_id=YOURID -header @{"client-id" = "YOURCLIENTID"; "Authorization" = "Bearer YOURACCESSTOKEN" }).Content That would help me understand if this is a problem with Twitch's API or my application. Thanks! |
Response from this, after a while, is:
Seems like the API is not working? |
Which command was that the response to? The first one? |
Oh sorry it's the last one. Every other request ran through quickly and successfully |
@micahmo Did you make a change regarding the issue of the limit of 100 ? :) |
@styler2go Wow, very interesting! Seems like it's related to the Twitch API and/or the application you created in their dev console. But there aren't really a lot of options. Maybe there's a new restriction which old apps are not subject to. I could try making a new one myself.
@Kperroch Yes, it is in the latest image now. But I don't think it will help this issue. |
I used a very old application from my Dev console. Should I try creating a new one? |
Something weird is going on. My application is from 2021 and works fine. But I just made a new one, and it returns the same |
Well dang, I just found this note in the Twitch documentation.
https://dev.twitch.tv/docs/api/reference/#get-users-follows I will have to work up an alternative! Sorry about that to you both! |
I've just ran through some code and it seems like the twitchlib api will need an update to support this new endpoint: https://dev.twitch.tv/docs/api/reference/#get-followed-channels (I'll assume you already know that as you are faster in your own code 😄) |
I submitted an issue on TwitchLib, and they already responded. Even without TwitchLib, I could make a direct HTTP call. The problem is that this data (followers) is being moved behind user-specific authorization. Having a Client Secret and Client ID isn't enough. You'll need to authorize your instance of twitch2tuner to make API calls on your user's behalf. This is actually how I had written twitch2tuner to work back in the day, but then I realized at the time all the data I needed was public, so I just had to authenticate as an app. I'm afraid it might have to go back. Another possibility is letting you specify the desired channels via configuration (env var). It's obviously not nearly as convenient as detecting everyone you follow, but it doesn't require any API changes. |
I also run in this issue, if i could help tell me 👍 Do you have any idea @micahmo how i can get xml epg from twitch a script/docker/app, i have some tools to make a matching of channels = epg id / channels name, but i don't know a tool for the scraping / getting info over api . |
Hi all, I've published a new version which utilizes the new Twitch API endpoint. It's a bit more complicated to set up as it requires a user authentication. You can alternatively specify the channels you want via an env var. I've updated with README with instructions. Let me know if it works. @CyberPoison Try the new version. It generate an EPG at the |
Thanks, I have tested and it works but it only gets 20 Followed Channels, perhaps i have some like 120 Channels followed, is there something i missed ? |
@CyberPoison, sorry about that! I failed to account for pagination in the new request. Can you try the latest? |
I have those issues when the server launch.
All the parameters seems to be fine as it can find user object.
Any Idea of how to solve ?
The text was updated successfully, but these errors were encountered: