Tokeny sesji to wygenerowane przez użytkownika ciągi znaków (lub obiekty), które śledzą wywołania Autouzupełniania (nowego) jako sesje. Autouzupełnianie (nowe) używa tokenów sesji do grupowania faz zapytania i wyboru w wyszukiwaniu autouzupełniania użytkownika w osobną sesję na potrzeby rozliczeń.
Użytkownicy odpowiadają za tworzenie tokenów sesji dla każdej sesji. Tokeny sesji muszą być ciągami znaków w formacie base64, które są bezpieczne w adresach URL i nazwach plików. Użytkownicy mogą generować tokeny sesji w dowolny sposób, ale Google zaleca używanie w przypadku tokenów sesji uniwersalnych identyfikatorów UUID w wersji 4.
Sesja rozpoczyna się od wywołania funkcji Autocomplete (New) i kończy się wywołaniem funkcji Place Details (New) lub Address Validation. Każda sesja może zawierać wiele zapytań Autocomplete (New), a po nich 1 prośbę o szczegóły miejsca (nowe) lub weryfikację adresu. Klucze interfejsu API używane w każdym żądaniu w ramach sesji muszą należeć do tego samego projektu w konsoli Google Cloud.
Tokeny sesji wygasają w ten sposób:
wywoływana jest funkcja Place Details (New);
Wywoływana jest usługa Weryfikacja adresu.
Sesja została przerwana.
Po zakończeniu sesji token traci ważność. Aplikacja musi generować nowy token dla każdej nowej sesji. Jeśli parametr sessionToken zostanie pominięty lub jeśli użyjesz ponownie tokena sesji, za nową sesję zostanie naliczona opłata tak, jakby nie podano tokena sesji (każde żądanie jest rozliczane osobno).
[[["Łatwo zrozumieć","easyToUnderstand","thumb-up"],["Rozwiązało to mój problem","solvedMyProblem","thumb-up"],["Inne","otherUp","thumb-up"]],[["Brak potrzebnych mi informacji","missingTheInformationINeed","thumb-down"],["Zbyt skomplikowane / zbyt wiele czynności do wykonania","tooComplicatedTooManySteps","thumb-down"],["Nieaktualne treści","outOfDate","thumb-down"],["Problem z tłumaczeniem","translationIssue","thumb-down"],["Problem z przykładami/kodem","samplesCodeIssue","thumb-down"],["Inne","otherDown","thumb-down"]],["Ostatnia aktualizacja: 2025-07-16 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"]]