Videos: reportAbuse
透過集合功能整理內容
你可以依據偏好儲存及分類內容。
檢舉含有不當內容的影片。
配額影響:呼叫此方法的配額費用為 50 個單位。
要求
HTTP 要求
POST https://www.googleapis.com/youtube/v3/videos/reportAbuse
授權
這項要求需要授權,且至少包含下列其中一個範圍 (進一步瞭解驗證和授權)。
範圍 |
https://www.googleapis.com/auth/youtube |
https://www.googleapis.com/auth/youtube.force-ssl |
https://www.googleapis.com/auth/youtubepartner |
參數
下表列出這項查詢支援的參數。列出的所有參數都是查詢參數。
參數 |
選用參數 |
onBehalfOfContentOwner |
string
這個參數只能用於適當的授權要求。注意:這個參數僅供 YouTube 內容合作夥伴使用。
onBehalfOfContentOwner 參數表示要求的授權憑證可識別 YouTube CMS 使用者,該使用者會代表參數值中指定的內容擁有者行事。這個參數適用於擁有及管理多個 YouTube 頻道的 YouTube 內容合作夥伴。這項功能可讓內容擁有者驗證一次,即可存取所有影片和頻道資料,不必為每個頻道提供驗證憑證。使用者驗證的 CMS 帳戶必須連結至指定的 YouTube 內容擁有者。 |
要求主體
要求主體的資料結構如下:
{
"videoId": string,
"reasonId": string,
"secondaryReasonId": string,
"comments": string,
"language": string
}
必要屬性
您必須為下列屬性設定值:
選用屬性
您可以為下列屬性設定值:
屬性
下表定義了這個資源中顯示的屬性:
屬性 |
videoId |
string
指出遭檢舉含有不當內容的影片。將值設為該影片的 YouTube 影片 ID。 |
reasonId |
object
指定檢舉影片含有不當內容的原因。將值設為適當 videoAbuseReportReason 資源的 unique ID 。 |
secondaryReasonId |
object
指定檢舉影片含有不當內容的次要原因。與 reasonId 屬性識別的主要原因相比,次要原因會提供更具體的內容描述。將值設為適當次要原因的 unique ID 。 |
language |
object
識別檢舉人所說的語言。 |
回應
如果成功,這個方法會傳回 HTTP 204
回應碼 (No Content
)。
錯誤
下表列出 API 在回應對此方法的呼叫時可能傳回的錯誤訊息。詳情請參閱錯誤訊息說明文件。
錯誤類型 |
錯誤詳細資料 |
說明 |
badRequest (400) |
invalidAbuseReason |
要求含有 reasonId 屬性的非預期值,或是 reasonId 和 secondaryReasonId 屬性的無效組合。 |
badRequest (400) |
rateLimitExceeded |
使用者在特定時間範圍內傳送過多要求。 |
forbidden (403) |
forbidden |
|
notFound (404) |
videoNotFound |
找不到要檢舉濫用行為的影片。 |
試試看!
使用 APIs Explorer 呼叫此 API,並查看 API 要求和回應。
除非另有註明,否則本頁面中的內容是採用創用 CC 姓名標示 4.0 授權,程式碼範例則為阿帕契 2.0 授權。詳情請參閱《Google Developers 網站政策》。Java 是 Oracle 和/或其關聯企業的註冊商標。
上次更新時間:2025-05-05 (世界標準時間)。
[[["容易理解","easyToUnderstand","thumb-up"],["確實解決了我的問題","solvedMyProblem","thumb-up"],["其他","otherUp","thumb-up"]],[["缺少我需要的資訊","missingTheInformationINeed","thumb-down"],["過於複雜/步驟過多","tooComplicatedTooManySteps","thumb-down"],["過時","outOfDate","thumb-down"],["翻譯問題","translationIssue","thumb-down"],["示例/程式碼問題","samplesCodeIssue","thumb-down"],["其他","otherDown","thumb-down"]],["上次更新時間:2025-05-05 (世界標準時間)。"],[[["\u003cp\u003eThis API allows reporting a YouTube video for abusive content using a POST request to \u003ccode\u003ehttps://www.googleapis.com/youtube/v3/videos/reportAbuse\u003c/code\u003e.\u003c/p\u003e\n"],["\u003cp\u003eReporting a video requires setting both the \u003ccode\u003evideoId\u003c/code\u003e (the ID of the video being reported) and the \u003ccode\u003ereasonId\u003c/code\u003e (the reason for reporting the video) within the request body.\u003c/p\u003e\n"],["\u003cp\u003eThe request can optionally include \u003ccode\u003esecondaryReasonId\u003c/code\u003e, \u003ccode\u003ecomments\u003c/code\u003e, and \u003ccode\u003elanguage\u003c/code\u003e for more detailed information about the report.\u003c/p\u003e\n"],["\u003cp\u003eUtilizing this API call consumes 50 quota units and requires authorization with specific scopes, such as \u003ccode\u003ehttps://www.googleapis.com/auth/youtube\u003c/code\u003e.\u003c/p\u003e\n"],["\u003cp\u003eThe API will return an error if an unexpected or invalid value is entered for \u003ccode\u003ereasonId\u003c/code\u003e or \u003ccode\u003esecondaryReasonId\u003c/code\u003e and if a video is not found.\u003c/p\u003e\n"]]],["This document details how to report a YouTube video for abusive content using the `videos.reportAbuse` API endpoint. A POST request is made to the API with a quota cost of 50 units. Authorization is needed using specified scopes. The request body requires the `videoId` and `reasonId`, and can optionally include `secondaryReasonId`, `comments`, and `language`. The response returns a 204 status code upon success and specific error codes in case of failure.\n"],null,[]]