问题
I am trying to get paginated comments on a video using following request:
https://www.googleapis.com/youtube/v3/commentThreads?part=snippet,replies&videoId=zB8byQHNHHg&maxResults=5&pageToken='2'&key=randomstring
But it is returning following response which shows 400 error:
What could be the reason as the official documentation states using pageToken for doing the same. https://developers.google.com/youtube/v3/docs/commentThreads/list#parameters
Anyone solved similar issue in the past? Please help.
回答1:
The following table list the page along with the corresponding page token and total results. Note that you do not (need to) pass in a pageToken for the first page.
+------+------------+---------------+
| Page | Page Token | Total Results |
+------+------------+---------------+
| 1 | [none] | 3628 |
| 2 | CDIQAA | 3628 |
| 3 | CGQQAA | 3626 |
| 4 | CJYBEAA | 3626 |
| 5 | CMgBEAA | 3625 |
| 6 | CPoBEAA | 3625 |
| 7 | CKwCEAA | 3625 |
| 8 | CN4CEAA | 3624 |
| 9 | CJADEAA | 3624 |
| 10 | CMIDEAA | 3624 |
+------+------------+---------------+
来源:https://stackoverflow.com/questions/47593438/youtube-api-v3-returning-400-error-when-using-pagetoken