-
Notifications
You must be signed in to change notification settings - Fork 6
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
Offset parameter ignore for kraken/users/follows #237
Comments
@mikechambers - thanks for filing this! We're taking a look at it in ticket VXL-1637, however in the meantime the other sorts beyond created_at (the default) will work with the offset normally. |
@lleadbet Thank you. Can confirm that works: |
Remember last sorting method and sorting order Hotfix sync/import from twitch due to a twitch API bug reported in twitchdev/issues#237
Remember last sorting method and sorting order Hotfix sync/import from twitch due to a twitch API bug reported in twitchdev/issues#237
Remember last sorting method and sorting order Hotfix sync/import from twitch due to a twitch API bug reported in twitchdev/issues#237
Remember last sorting method and sorting order Hotfix sync/import from twitch due to a twitch API bug reported in twitchdev/issues#237
Remember last sorting method and sorting order Hotfix sync/import from twitch due to a twitch API bug reported in twitchdev/issues#237
Worth noting that |
Yep, broken and Example (without posting explicit user and channel IDs): $ curl -s \
-H "Accept: application/vnd.twitchtv.v5+json" \
-H "Client-ID: CLIENT_ID" \
-H "Authorization: OAuth TOKEN" \
"https://api.twitch.tv/kraken/users/USER_ID/follows/channels" \
| jq '._total'
140 $ curl -s \
-H "Accept: application/vnd.twitchtv.v5+json" \
-H "Client-ID: CLIENT_ID" \
-H "Authorization: OAuth TOKEN" \
"https://api.twitch.tv/kraken/users/USER_ID/follows/channels?limit=5&offset=0" \
| jq '.follows[].created_at'
"2020-12-03T00:36:57Z"
"2020-09-07T20:19:11Z"
"2020-06-25T20:50:17Z"
"2020-05-24T17:53:24Z"
"2020-03-29T15:09:01Z" $ curl -s \
-H "Accept: application/vnd.twitchtv.v5+json" \
-H "Client-ID: CLIENT_ID" \
-H "Authorization: OAuth TOKEN" \
"https://api.twitch.tv/kraken/users/USER_ID/follows/channels?limit=5&offset=5" \
| jq '.follows[].created_at'
"2020-12-03T00:36:57Z"
"2020-09-07T20:19:11Z"
"2020-06-25T20:50:17Z"
"2020-05-24T17:53:24Z"
"2020-03-29T15:09:01Z" |
@d-fischer @bastimeyer - Apologies for radio silence here. The team is still digging into the above ticket, however we wanted to provide a couple updates on the As noted above, the offset parameter is no longer working, and we're planning to deprecate it as a result. In its place, you can use the If you have issues with that, please tag me directly and I'll have the team triage quickly. Additionally- @bastimeyer, if you have specific pagination issues you're noting, please feel free to let me know and I'm happy to dig. You can ping me on Discord in the TwitchDev Discord as @ConcreteEntree. Again- sincere apologies here. |
@lleadbet For the original bug, the workaround was to use a sort other than the default (created_at), which then works correctly. Will this still work? |
@mikechambers - For the users endpoint, that's correct. The above only applies to the channel follows endpoint in v5. |
There is no |
Could we please get a response from one of the responsible Twitch API devs? As I've already said a month ago, the API on the And the documented This needs to be fixed. no curl -s \
-H "Accept: application/vnd.twitchtv.v5+json" \
-H "Client-ID: MY_CLIENT_ID" \
-H "Authorization: OAuth MY_OAUTH_TOKEN" \
"https://api.twitch.tv/kraken/users/MY_USER_ID/follows/channels?limit=1" \
| jq {
"_total": 138,
"follows": [
{...}
]
}
curl -s \
-H "Accept: application/vnd.twitchtv.v5+json" \
-H "Client-ID: MY_CLIENT_ID" \
-H "Authorization: OAuth MY_OAUTH_TOKEN" \
"https://api.twitch.tv/kraken/users/MY_USER_ID/follows/channels?limit=1" \
| jq -r '.follows[0].channel._id'
419330868 curl -s \
-H "Accept: application/vnd.twitchtv.v5+json" \
-H "Client-ID: MY_CLIENT_ID" \
-H "Authorization: OAuth MY_OAUTH_TOKEN" \
"https://api.twitch.tv/kraken/users/MY_USER_ID/follows/channels?limit=1&offset=1" \
| jq -r '.follows[0].channel._id'
419330868 curl -s \
-H "Accept: application/vnd.twitchtv.v5+json" \
-H "Client-ID: MY_CLIENT_ID" \
-H "Authorization: OAuth MY_OAUTH_TOKEN" \
"https://api.twitch.tv/kraken/users/MY_USER_ID/follows/channels?limit=1&offset=2" \
| jq -r '.follows[0].channel._id'
419330868 |
It's annoying that this bug is still alive for more than a half of year, but work-around with |
Closing due to the deprecation of the Kraken API as of February 2023. |
Brief description
When using:
https://dev.twitch.tv/docs/v5/reference/users#get-user-follows
The offset value is being ignored, making it impossible to load all data (above 100).
Example call:
https://api.twitch.tv/kraken/users/43091333/follows/channels?limit=100&offset=0
Returns first 100 items, with a _total of 382.
If you then increment the offset:
https://api.twitch.tv/kraken/users/43091333/follows/channels?limit=100&offset=100
The same data set is returned.
I started getting reports about this about two days ago, and it appears to only impact some users. In my case, I was not using Oauth for authentication, but rather passing in user id via URL and setting the Accept header : application/vnd.twitchtv.v5+json.
There are a number of other reports on the Twitch Developer discord, included below:
How to reproduce
Expected behavior
Offset value increments data being returned
Screenshots
Additional context or questions
The text was updated successfully, but these errors were encountered: