1
當我使用https://developers.google.com/youtube/v3/docs/channels/list頁上的測試表單獲取我的上傳ID時,我沒有在輸出中獲取上傳ID信息。youtube-v3-api頻道列表錯誤
200 OK
- HIDE HEADERS -
cache-control: private, max-age=0, must-revalidate, no-transform
content-encoding: gzip
content-length: 184
content-type: application/json; charset=UTF-8
date: Sun, 20 Sep 2015 05:09:05 GMT
etag: "jOXstHOM20qemPbHbyzf7ztZ7rI/Z9n3n2b5RwRnE9WNo9TXpCBWbY4"
expires: Sun, 20 Sep 2015 05:09:05 GMT
server: GSE
vary: Origin, X-Origin
{
"kind": "youtube#channelListResponse",
"etag": "\"jOXstHOM20qemPbHbyzf7ztZ7rI/Z9n3n2b5RwRnE9WNo9TXpCBWbY4\"",
"pageInfo": {
"totalResults": 0,
"resultsPerPage": 5
},
"items": [
]
}
命令用於生成這個請求是
GET https://www.googleapis.com/youtube/v3/channels?part=contentDetails&forUsername=StraconisChannel
,混淆我的是我在做同樣的事情由一個教程,我下面的建議的一部分,我的唯一的事情m改變是頻道名稱,並改用我的頻道名稱。他看起來就像這樣:
200 OK
- HIDE HEADERS -
cache-control: private, max-age=0, must-revalidate, no-transform
content-encoding: gzip
content-length: 350
content-type: application/json; charset=UTF-8
date: Sun, 20 Sep 2015 05:15:54 GMT
etag: "jOXstHOM20qemPbHbyzf7ztZ7rI/ih1aNGvKXcChCR4os4iGDwWDjmQ"
expires: Sun, 20 Sep 2015 05:15:54 GMT
server: GSE
vary: Origin, X-Origin
{
"kind": "youtube#channelListResponse",
"etag": "\"jOXstHOM20qemPbHbyzf7ztZ7rI/ih1aNGvKXcChCR4os4iGDwWDjmQ\"",
"pageInfo": {
"totalResults": 1,
"resultsPerPage": 5
},
"items": [
{
"kind": "youtube#channel",
"etag": "\"jOXstHOM20qemPbHbyzf7ztZ7rI/vDeq-1ACEYq89nbPsEZtYt0KNW0\"",
"id": "UC29ju8bIPH5as8OGnQzwJyA",
"contentDetails": {
"relatedPlaylists": {
"likes": "LL29ju8bIPH5as8OGnQzwJyA",
"favorites": "FL29ju8bIPH5as8OGnQzwJyA",
"uploads": "UU29ju8bIPH5as8OGnQzwJyA"
},
"googlePlusUserId": "111890735795696959293"
}
}
]
}
用於他的成績請求:
GET https://www.googleapis.com/youtube/v3/channels?part=contentDetails&forUsername=techguyweb
我激活使用OAuth 2.0,所以我不知道是什麼問題的授權。
編輯
註釋說,因爲這是我的YouTube用戶名,而不是我的谷歌加上帳戶名稱。我忘了把它也提供給我們。這是相同的結果。
200 OK
- HIDE HEADERS -
cache-control: private, max-age=0, must-revalidate, no-transform
content-encoding: gzip
content-length: 184
content-type: application/json; charset=UTF-8
date: Sun, 20 Sep 2015 14:10:14 GMT
etag: "jOXstHOM20qemPbHbyzf7ztZ7rI/Z9n3n2b5RwRnE9WNo9TXpCBWbY4"
expires: Sun, 20 Sep 2015 14:10:14 GMT
server: GSE
vary: Origin, X-Origin
{
"kind": "youtube#channelListResponse",
"etag": "\"jOXstHOM20qemPbHbyzf7ztZ7rI/Z9n3n2b5RwRnE9WNo9TXpCBWbY4\"",
"pageInfo": {
"totalResults": 0,
"resultsPerPage": 5
},
"items": [
]
}
因爲這是您的YouTube用戶名,而不是您的Google +帳戶名。沒什麼奇怪的 – mpgn