Anmeldedaten für die Authentifizierung der Google Wallet REST API generieren
Mit Sammlungen den Überblick behalten
Sie können Inhalte basierend auf Ihren Einstellungen speichern und kategorisieren.
Google Wallet bietet eine REST API, mit der du Karten/Tickets erstellen und verwalten kannst.
Senden von Anfragen an die Google Wallet API über HTTP Das ist hilfreich für Personen,
serverseitige Dienste erstellen möchten,
die Karten/Tickets programmatisch verarbeiten.
Wenn Sie die Google Wallet REST API verwenden möchten, müssen Sie die API in der Google Cloud Console aktivieren.
Erstellen Sie ein Google Cloud-Dienstkonto und generieren Sie dann einen Schlüssel für das Dienstkonto.
Wenn du Karten/Tickets mit der REST API erstellst, wird der Dienstkontoschlüssel, mit dem deine
JSON Web Token-codierte Karten-/Ticketobjekte.
Für andere Vorgänge wie das Aktualisieren oder Löschen von Karten/Tickets: Dienstkontoschlüssel
wird mit der Anfrage gesendet, Sie als Karten-/Ticketaussteller zu authentifizieren.
1. Google Wallet REST API aktivieren
So aktivieren Sie die Google Wallet REST API:
Wenn Sie noch kein Google Cloud-Konto haben, rufen Sie die Google Cloud Console auf.
und folgen Sie der Anleitung, um sich für ein neues Konto zu registrieren.
Wählen Sie oben in der Konsole im Drop-down-Menü für Projekte das Projekt
Cloud-Projekt, das Sie verwenden möchten, oder erstellen Sie ein neues.
Klicke auf „Aktivieren“ Schaltfläche. In wenigen Augenblicken wird die Google Wallet REST API
die für das ausgewählte Google Cloud-Projekt verfügbar sind.
2. Google Cloud-Dienstkontoschlüssel generieren
Um Anfragen an die Google Wallet REST API zu authentifizieren, musst du eine
Dienstkonto und generieren Sie einen Dienstkontoschlüssel. Gehen Sie dazu so vor:
Geben Sie die Details zum Dienstkonto ein. Notieren Sie sich die E-Mail-Adresse für den Dienst.
das unterhalb der „Dienstkonto-ID“ ein. Sie benötigen diesen später
wenn du das Dienstkonto verwendest, um deine Anfragen an das Google Wallet-Konto zu authentifizieren.
REST API
Klicke auf FERTIG Schaltfläche. Das andere Dienstkonto muss nicht ausgefüllt werden.
Erstellungsschritten.
Klicke auf „SCHLÜSSEL“. oben auf der Seite.
Klicke auf SCHLÜSSEL HINZUFÜGEN. und dann auf "Neuen Schlüssel erstellen".
Wählen Sie den Schlüsseltyp „JSON“ aus.
Klicken Sie auf ERSTELLEN. um den Dienstkontoschlüssel zu erstellen und herunterzuladen.
3. Dienstkonto in der Google Wallet Console autorisieren
So authentifizieren Sie Ihre Anfragen an die Google Wallet REST API mithilfe eines Dienstkontos:
müssen Sie die E-Mail-Adresse Ihres Dienstkontos als Nutzer zu Ihrem
Ausstellerkonto. So fügen Sie Ihr Dienstkonto als Nutzer hinzu:
Rufen Sie in der Google Cloud Console die Seite Dienstkonten auf.
Kopiere die E-Mail-Adresse des Dienstkontos, mit dem du deine Anfragen an die Google Wallet API authentifizieren möchtest.
Klicken Sie im linken Navigationsbereich auf „Nutzer“.
Klicken Sie auf „Nutzer einladen“.
Geben Sie die E-Mail-Adresse Ihres Dienstkontos ein.
Wählen Sie unter „Zugriffsebene“ die Option „Entwickler“ aus.
Klicken Sie auf „Einladen“. Schaltfläche.
Sobald Ihr Dienstkonto hinzugefügt wurde, können Sie beliebige generierte Dienstkontoschlüssel verwenden
damit Anfragen an die Google Wallet REST API authentifiziert werden. Bei Nutzung des Dienstes
Kontoschlüssel verwenden, beachten Sie, dass dies streng vertrauliche Anmeldedaten sind, die
sollte nur in sicheren, serverseitigen Umgebungen verwendet werden.
[[["Leicht verständlich","easyToUnderstand","thumb-up"],["Mein Problem wurde gelöst","solvedMyProblem","thumb-up"],["Sonstiges","otherUp","thumb-up"]],[["Benötigte Informationen nicht gefunden","missingTheInformationINeed","thumb-down"],["Zu umständlich/zu viele Schritte","tooComplicatedTooManySteps","thumb-down"],["Nicht mehr aktuell","outOfDate","thumb-down"],["Problem mit der Übersetzung","translationIssue","thumb-down"],["Problem mit Beispielen/Code","samplesCodeIssue","thumb-down"],["Sonstiges","otherDown","thumb-down"]],["Zuletzt aktualisiert: 2025-09-04 (UTC)."],[[["\u003cp\u003eGoogle Wallet's REST API enables programmatic management of passes via HTTP requests, ideal for server-side integrations.\u003c/p\u003e\n"],["\u003cp\u003eTo utilize the API, enable it in the Google Cloud console, create a service account, and generate a key for authentication.\u003c/p\u003e\n"],["\u003cp\u003eThis service account key is crucial for signing JWT-encoded Passes Objects during creation and for authenticating other operations like updates and deletions.\u003c/p\u003e\n"],["\u003cp\u003eGranting 'Developer' access to the service account in the Google Pay & Wallet console authorizes API requests.\u003c/p\u003e\n"]]],["The Google Wallet REST API allows programmatic pass management via HTTP requests. To use it, enable the API in the Google Cloud console, create a service account, and generate a JSON key. This key is used to sign JSON Web Token-encoded Pass Objects for creation and authenticates requests for updates or deletions. Finally, authorize the service account by adding its email as a 'Developer' user in the Google Pay & Wallet console. This process enables secure, server-side interaction with the Google Wallet.\n"],null,["# Generating Google Wallet REST API authentication credentials\n\nGoogle Wallet offers a REST API that lets you create and manage passes by\nsending requests to the Google Wallet API over HTTP. This is useful for those who\nwant to build server-side services to work with passes programmatically.\n\nTo use the Google Wallet REST API, you must enable the API in the Google Cloud console,\ncreate a Google Cloud service account, then generate a key for the service account.\n\nWhen you create passes with the REST API, the service account key used to sign your\nJSON Web Token-encoded Passes Objects.\n\nFor other operations, such as updating or deleting passes, the service account key\nis sent with the request to authenticate you as the Pass Issuer.\n\n1. Enable the Google Wallet REST API\n------------------------------------\n\nTo enable the Google Wallet REST API, do the following:\n\n1. If you don't already have a Google Cloud account, go to the [Google Cloud console](https://console.cloud.google.com) and follow the steps to register for a new account.\n2. From the project drop-down menu at the top of the console, select the Google Cloud project you want to use, or create a new one.\n3. Go to the [Google Wallet API product details page](https://console.cloud.google.com/apis/library/walletobjects.googleapis.com) in the Google Cloud console Marketplace.\n4. Click the 'Enable' button. In a few moments, the Google Wallet REST API will be available for the selected Google Cloud project.\n\n2. Generate a Google Cloud service account key\n----------------------------------------------\n\nTo authenticate requests to the Google Wallet REST API, you'll need to create a\nservice account, and generate a service account key by doing the following:\n\n1. Go to the ['Create service account' page](https://console.cloud.google.com/iam-admin/serviceaccounts/create) in the Google Cloud console.\n2. Fill in the service account details. Note the email address for the service account that appears below the 'Service account ID' field. You will need this later when you use the service account to authenticate your requests to the Google Wallet REST API.\n3. Click the 'DONE' button. There is no need to complete the other service account creation steps.\n4. Click the 'KEYS' menu item at the top of the page.\n5. Click the 'ADD KEY' drop-down menu, then click 'Create new key'.\n6. Select key type 'JSON'.\n7. Click 'CREATE' to create and download the service account key.\n\n3. Authorize your service account in the Google Wallet console\n--------------------------------------------------------------\n\nTo authenticate your requests to the Google Wallet REST API using a service account\nkey, you must add the email address of your service account as a user to your\nIssuer account. To add your service account as a user, do the following:\n\n1. Go to the ['Service accounts'](https://console.cloud.google.com/iam-admin/serviceaccounts) page in the Google Cloud console.\n2. Copy the email address of the service account you want to use to authenticate your requests to the Google Wallet API.\n3. Go to the [Google Pay \\& Wallet console](https://pay.google.com/business/console/).\n4. In the left nav, click 'Users'.\n5. Click 'Invite a user'.\n6. Input the email address of your service account.\n7. In the 'Access level' drop-down, select 'Developer'.\n8. Click the 'Invite' button.\n\nOnce your service account is added, you can use any service account keys generated\nfor it to authenticate requests to the Google Wallet REST API. When using service\naccount keys, keep in mind that these are highly sensitive credentials that\nshould only be used in secure, server-side environments."]]