מדריך מפתח — Google EKO
למנהל הפיתוח בלבד | עודכן: 08/04/2026
מפתח
ארכיטקטורת Google EKO
admin (מנהל מערכת)
Shared Calendar (calendar.events)
Shared Drive (drive.file)
Shared Connector — builder's account. Read-only oversight.
mentor (מנטור)
App User Calendar — VIP Connector (id: 69d68cff19b7105027bcbc42)
App User Drive — Google Drive מנטורים (id: 69d6ae556ff874b8af82b4a5)
App User Connector — each mentor connects their own account.
vip (לקוח VIP)
App User Calendar — VIP Connector
App User Drive — Google Drive מנטורים
Same connectors as mentor — each VIP connects their own account.
מזהי קונקטורים — חיוני
VIP Connector (Calendar — App User)
69d68cff19b7105027bcbc42googlecalendarGoogle Drive מנטורים (Drive — App User)
69d6ae556ff874b8af82b4a5googledriveShared Calendar (admin)
N/A — use getConnection('googlecalendar')sharedShared Drive (admin)
N/A — use getConnection('googledrive')shared דוגמאות קוד
קבלת access token — App User Connector
// In backend function:
const accessToken = await base44.asServiceRole.connectors
.getCurrentAppUserAccessToken("69d68cff19b7105027bcbc42"); // VIP Connector ID
// Use in API call:
const res = await fetch("https://www.googleapis.com/calendar/v3/calendars/primary/events", {
headers: { Authorization: `Bearer ${accessToken}` }
});קבלת access token — Shared Connector
// In backend function:
const { accessToken } = await base44.asServiceRole.connectors
.getConnection("googlecalendar"); // integration_type
const res = await fetch("https://www.googleapis.com/calendar/v3/calendars/primary/events", {
headers: { Authorization: `Bearer ${accessToken}` }
});Frontend — חיבור App User
import { base44 } from "@/api/base44Client";
const CONNECTOR_ID = "69d68cff19b7105027bcbc42"; // VIP Connector
const handleConnect = async () => {
const url = await base44.connectors.connectAppUser(CONNECTOR_ID);
const popup = window.open(url, "_blank");
const timer = setInterval(() => {
if (!popup || popup.closed) { clearInterval(timer); fetchData(); }
}, 500);
}; Google API Rate Limits
Calendar API
1M requests/day
100 requests/100sec/user
Drive API
1B requests/day
1000 requests/100sec/user
לשגיאות 429/503 — בצע retry עם exponential backoff (1s, 2s, 4s — מקסימום 3 ניסיונות).
כללי אבטחה — חובה
לעולם אל תאחסן access tokens ב-entities או ב-state — תמיד קרא מחדש עם getCurrentAppUserAccessToken()
tokens לא עוברים לפרונטנד — פונקציות backend בלבד
בדוק base44.auth.me() לפני כל פעולה מורשית
drive.file scope בלבד — לעולם לא drive מלא
calendar.events scope בלבד — לא calendar מלא