常見錯誤與建議的行動
本頁面列出常見錯誤的範例,並提供預防及處理這些錯誤的訣竅。如需其他指引,請參閱 Google API 錯誤模型。
錯誤代碼 |
400 |
Invalid Argument
訊息 要求網址中的帳戶資訊無效:'accounts/pub-XXXXXXXXXXXXXXXX'
詳細資料 將 pub-XXXXXXXXXXXXXXXX 換成您的發布商 ID,請參閱操作說明找出您的發布商 ID。
|
Invalid Argument
訊息 單次報表請求中最多只能請求 100,000 列資料。
詳細資訊 將 max_report_rows 欄位變更為 1 到 100,000 (含) 之間的值。
|
Invalid Argument
訊息 請求的指標和維度不相容。
詳情 請參閱參考說明文件,確認哪些指標和維度不適用於聯播網和中介服務報表。
|
|
401 |
Unauthorized
郵件 要求缺少必要的驗證憑證。預期的 OAuth 2 存取權杖、登入 Cookie 或其他有效驗證憑證。詳情請參閱 https://developers.google.com/identity/sign-in/web/devconsole-project。
詳細資料 下列帳戶的存取權杖未獲授權。按照「開始使用」頁面 中的步驟完成驗證。在接受同意畫面時,確認您已登入具備所需 使用者角色的帳戶。
|
|
403 |
Permission Denied
訊息 專案 XXXXXXXXXXXX 未曾使用 AdMob API,或該 API 已停用。請前往 https://console.developers.google.com/apis/api/admob.googleapis.com/overview?project=XXXXXXXXXXXX 啟用此功能,然後重試。
詳細資料 對指定資源的存取權遭拒。這通常是因為專案沒有啟用 AdMob API。前往 Google Cloud 控制台啟用 AdMob API。
|
Access Denied
訊息 有效使用者無法存取您要求的資源
詳細資料 有效使用者存取指定資源的要求遭到拒絕。如要進一步瞭解使用者角色及檢查權限,請參閱下列「新使用者角色」一文。
|
|
429 |
Resource Exhausted
訊息 超過配額群組「ReportingReadGroup」的配額,並針對消費者「project_number:XXXXXXXXXXXX」的「admob.googleapis.com」服務限制「每位使用者每 100 秒回報讀取要求」限制。
詳細資料 已超出配額限制。如要瞭解配額限制,請前往「配額」頁面。
|
|
除非另有註明,否則本頁面中的內容是採用創用 CC 姓名標示 4.0 授權,程式碼範例則為阿帕契 2.0 授權。詳情請參閱《Google Developers 網站政策》。Java 是 Oracle 和/或其關聯企業的註冊商標。
上次更新時間:2024-11-08 (世界標準時間)。
[null,null,["上次更新時間:2024-11-08 (世界標準時間)。"],[[["This page provides examples of common AdMob API errors and tips for preventing and resolving them."],["Errors are categorized by error code (e.g., 400, 401, 403, 429) and include detailed messages and troubleshooting steps."],["Common issues include invalid arguments, authentication failures, permission issues, and exceeding quota limits."],["Refer to the Google API Error Model and the provided links for further guidance on error handling."]]],[]]