הפעלת ממשקי API של Google Workspace

לפני שאתם משתמשים בממשקי Google API, אם צריכים להפעיל אותם בפרויקט ב-Google Cloud. בכל פרויקט אפשר להפעיל ממשק API אחד או יותר. אם עדיין אין לכם פרויקט ב-Google Cloud, כדאי לעיין במאמר בנושא יצירת פרויקט ב-Cloud.

כדי להפעיל API בפרויקט Cloud:

מסוף Google Cloud

  1. במסוף Google Cloud, עוברים אל תפריט > מוצרים נוספים > Google Workspace > ספריית מוצרים.

    מעבר אל Product Library

  2. לוחצים על ה-API שרוצים להפעיל.
  3. לוחצים על Enable.
  4. כדי להפעיל עוד ממשקי API, חוזרים על השלבים האלה.

Google Cloud CLI

  1. מתקינים או פותחים את ממשק שורת הפקודה (CLI) של Google Cloud.
  2. מריצים את הפקודה services enable ומציינים את שירות ה-API שרוצים להפעיל.

    gcloud services enable API_SERVICE_ID

(אופציונלי) התנסות בממשקי API של Google Workspace באפליקציות ניסיוניות

אם אתם מתנסים ב-Google Workspace, אתם יכולים להשתמש בקיצור הדרך הבא כדי להפעיל ממשקי API פופולריים של Google Workspace וליצור פרטי כניסה של OAuth שתוכלו להשתמש בהם.

אם אתם מפתחים אפליקציה שגשת למידע של משתמשים, אתם צריכים להגדיר את מסך ההסכמה ל-OAuth לפני שאתם מפרסמים את האפליקציה.

לוחצים על הלחצן הזה כדי לבחור או ליצור פרויקט ב-Google Cloud, וכדי להפעיל באופן אוטומטי את ממשקי ה-API של Workspace:

הפעלת ממשקי API של Workspace

בתיבת הדו-שיח שמופיעה, לוחצים על הורדת הגדרות הלקוח ושומרים את הקובץ credentials.json בספריית העבודה.

כאן אפשר לראות את Google Workspace APIs explorer, שכולל רשימה מקיפה של כל ממשקי ה-API הזמינים, ומאפשר לנסות שיטות ספציפיות מהדפדפן.

ממשקי API מופעלים (לחיצה להרחבה)

הלחצן מפעיל את ממשקי ה-API הבאים:

  • Admin SDK API
  • Apps Script API
  • Calendar API
  • Chat API
  • Classroom API
  • Docs API
  • Drive API
  • Forms API
  • ממשק ה-API של Gmail
  • Google Workspace Add-ons API
  • Google Keep API
  • Meet REST API
  • Sheets API
  • Slides API

ממשקי API של Google Workspace

כדי להפעיל ממשקי API ספציפיים של Google Workspace בפרויקט שלכם ב-Cloud, אתם יכולים להשתמש בקישורים הבאים למסוף Google Cloud או בממשק שורת הפקודה (CLI) של Google Cloud.

הפעלת Admin SDK API
gcloud services enable admin.googleapis.com
הפעלת Alert Center API
gcloud services enable alertcenter.googleapis.com
הפעלת Apps Script API
gcloud services enable script.googleapis.com
הפעלה של CalDAV API
gcloud services enable caldav.googleapis.com
הפעלת Calendar API
gcloud services enable calendar-json.googleapis.com
הפעלת Chat API
gcloud services enable chat.googleapis.com
הפעלה של Classroom API
gcloud services enable classroom.googleapis.com
הפעלת Cloud Identity API
gcloud services enable cloudidentity.googleapis.com
הפעלה של Cloud Search API
gcloud services enable cloudsearch.googleapis.com
מפעילים את Docs API
gcloud services enable docs.googleapis.com
הפעלה של Drive API
gcloud services enable drive.googleapis.com
הפעלת Drive Activity API
gcloud services enable driveactivity.googleapis.com
הפעלת Drive Labels API
gcloud services enable drivelabels.googleapis.com
הפעלת Forms API
gcloud services enable forms.googleapis.com
הפעלת Gmail API
gcloud services enable gmail.googleapis.com
מפעילים את Groups Migration API
gcloud services enable groupsmigration.googleapis.com
הפעלה של Groups Settings API
gcloud services enable groupssettings.googleapis.com
הפעלת Google Workspace Add-ons API
gcloud services enable gsuiteaddons.googleapis.com
הפעלת Google Keep API
gcloud services enable keep.googleapis.com
הפעלת Enterprise License Manager API
gcloud services enable licensing.googleapis.com
הפעלת Marketplace API
gcloud services enable appsmarket.googleapis.com
הפעלת Marketplace SDK
gcloud services enable appsmarket-component.googleapis.com
הפעלת Meet REST API
gcloud services enable meet.googleapis.com
הפעלה של People API
gcloud services enable people.googleapis.com
הפעלת Postmaster Tools API
gcloud services enable gmailpostmastertools.googleapis.com
הפעלת Reseller API
gcloud services enable reseller.googleapis.com
הפעלת Sheets API
gcloud services enable sheets.googleapis.com
הפעלה של Slides API
gcloud services enable slides.googleapis.com
הפעלת Tasks API
gcloud services enable tasks.googleapis.com
הפעלת Vault API
gcloud services enable vault.googleapis.com

השלב הבא

איך פועלים אימות והרשאה בממשקי Google Workspace API.