YouTube API v3 returning 400 error when using pageToken

痞子三分冷 提交于 2019-12-11 15:24:28

问题


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

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!