אסימוני סשנים הם מחרוזות (או אובייקטים) שנוצרים על ידי משתמשים ומשמשים למעקב אחרי קריאות ל-Autocomplete (חדש) בתור סשנים. ב'השלמה אוטומטית (חדש)' נעשה שימוש באסימוני סשן כדי לקבץ את שלבי השאילתה והבחירה בחיפוש של משתמש עם השלמה אוטומטית לסשן נפרד למטרות חיוב.
המשתמשים אחראים ליצור אסימוני סשן לכל סשן. אסימוני הסשן חייבים להיות מחרוזות Base64 ללא סימנים אסורים בכתובות URL ובשמות קבצים. משתמשים יכולים ליצור אסימוני סשן בכל דרך, אבל Google ממליצה להשתמש במזהי UUID (מזהי ייחודי אוניברסליים) בגרסה 4 לאסימוני סשן.
הסשן מתחיל בקריאה להשלמה אוטומטית (חדשה) ומסתיים בקריאה לפרטי המקום (חדשים) או לאימות כתובת. כל סשן יכול לכלול מספר שאילתות של השלמה אוטומטית (חדש), ולאחר מכן בקשה אחת ל'פרטי מקום' (חדש) או לאימות כתובת. מפתחות ה-API שנעשה בהם שימוש בכל בקשה במהלך סשן חייבים להיות שייכים לאותו פרויקט במסוף Google Cloud.
אסימוני סשן מסתיימים בדרכים הבאות:
המערכת קוראת לפונקציה Place Details (New).
מתבצעת קריאה ל-Address Validation.
הסשן יבוטל.
בסיום הסשן, האסימון כבר לא תקף. האפליקציה צריכה ליצור אסימון חדש לכל סשן חדש. אם הפרמטר sessionToken לא יצוין או אם משתמשים שוב באסימון סשן, הסשן החדש יחויב כאילו לא סופק אסימון סשן (כל בקשה מחויבת בנפרד).
[null,null,["עדכון אחרון: 2025-02-25 (שעון UTC)."],[[["Session tokens group Autocomplete (New) queries and selection phases into a session for billing purposes, ending with a call to Place Details (New) or Address Validation."],["Session tokens must be URL- and filename-safe base64 strings, with Google recommending the use of version 4 universally unique identifiers (UUIDs)."],["A session begins with an Autocomplete (New) call, allowing for multiple queries within the session before concluding with Place Details (New) or Address Validation."],["Each request within a session must utilize API keys associated with the same Google Cloud Console project, with sessions terminating upon calling Place Details (New), Address Validation, or abandonment."],["Omitting or reusing session tokens results in individual request billing, while fresh tokens are required for each new session to leverage session-based pricing."]]],["Session tokens, user-generated strings, track Autocomplete (New) calls as sessions for billing. Users create tokens, ideally UUIDs, for each session. A session starts with Autocomplete (New) and ends with Place Details (New) or Address Validation, allowing multiple Autocomplete queries. The API keys must be from the same project. Omitting the token or reusing it results in per-request billing. Session tokens are invalid after use and can not be exchanged between places API and places API (new) or Address Validation.\n"]]