אישור בקשות
כל בקשה שהאפליקציה שולחת ל-Google AMP URL API צריכה לזהות את הבקשה שלכם ב-Google.
מאתרים את האפליקציה באמצעות מפתח ה-API.
קבלת מפתח API ושימוש בו
מפתח API חייב ללוות בקשות ל-Google AMP URL URL לקבלת נתונים ציבוריים.
מפתח ה-API מזהה את הפרויקט שלכם ומספק גישה ל-API, מכסה ודוחות.
כדי לקבל מפתח API, יש לבצע את הפעולות הבאות:
- פותחים את דף פרטי הכניסה.
- ליצור מפתח שרת ולהשתמש בו.
אין להשתמש במפתח הזה מחוץ לקוד השרת.
לדוגמה, אין להטמיע אותו בדף אינטרנט.
כדי למנוע גניבה של המגבלה,
יש להגביל את המפתח כך שניתן יהיה להגיש בקשות רק
מכתובות ה-IP שלך מהשרתים.
כדי לשמור על אבטחת מפתחות ה-API, יש לפעול לפי השיטות המומלצות לשימוש מאובטח במפתחות API.
אחרי שמקבלים מפתח API, האפליקציה יכולה לצרף את פרמטר השאילתה לכל כתובות ה-URL של הבקשה.key=yourAPIKey
מפתח ה-API בטוח להטמעה בכתובות URL. אין צורך בקידוד כלשהו.
אלא אם צוין אחרת, התוכן של דף זה הוא ברישיון Creative Commons Attribution 4.0 ודוגמאות הקוד הן ברישיון Apache 2.0. לפרטים, ניתן לעיין במדיניות האתר Google Developers. Java הוא סימן מסחרי רשום של חברת Oracle ו/או של השותפים העצמאיים שלה.
עדכון אחרון: 2023-08-30 (שעון UTC).
[null,null,["עדכון אחרון: 2023-08-30 (שעון UTC)."],[[["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"]]