授權要求
透過集合功能整理內容
你可以依據偏好儲存及分類內容。
應用程式傳送至 Google AMP URL API 的每項要求都必須向 Google 識別您的應用程式。使用應用程式的 API 金鑰來識別應用程式。
取得並使用 API 金鑰
API 金鑰必須隨附向 Google AMP URL API 發出的公開資料要求。
API 金鑰可用來識別您的專案,並提供 API 存取權、配額和報表。
如要取得 API 金鑰,請按照下列步驟操作:
- 開啟「憑證」頁面。
- 建立及使用伺服器金鑰。請勿在伺服器程式碼外使用這組金鑰。例如,不要嵌入網頁。為避免配額遭竊,請將金鑰限制為只允許來自伺服器的要求 (來源 IP 位址)。
為確保 API 金鑰安全無虞,請遵循安全使用 API 金鑰的最佳做法。
建立 API 金鑰後,您的應用程式可將查詢參數 key=yourAPIKey
附加至所有要求網址。
API 金鑰可以安全地嵌入網址中,不需任何編碼。
除非另有註明,否則本頁面中的內容是採用創用 CC 姓名標示 4.0 授權,程式碼範例則為阿帕契 2.0 授權。詳情請參閱《Google Developers 網站政策》。Java 是 Oracle 和/或其關聯企業的註冊商標。
上次更新時間:2023-08-30 (世界標準時間)。
[[["容易理解","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"]],["上次更新時間:2023-08-30 (世界標準時間)。"],[[["Every request sent to the Google AMP URL API must identify your application using an API key."],["Obtain an API key through the Google Developers Console, specifically a Server key, and restrict its usage to your server's IP addresses for security."],["Include your API key in all request URLs as a query parameter (`key=yourAPIKey`), which is safe for embedding without encoding."]]],["To interact with the Google AMP URL API, obtain an API key from the Credentials page. Create a Server key and restrict it to your server's IP addresses for security. Append the `key=`yourAPIKey parameter to all request URLs. This key identifies your project, grants API access, and provides quota and reports. Do not embed the key outside of server code, as it's designed for server-side use. Refer to the linked best practices for securely managing your API key.\n"]]