Der Support für Cloud Deployment Manager endet am 31. Dezember 2025. Wenn Sie derzeit Deployment Manager verwenden, müssen Sie bis zum 31. Dezember 2025 zu Infrastructure Manager oder einer alternativen Bereitstellungstechnologie migrieren, damit Ihre Dienste ohne Unterbrechung weiterlaufen.
Mit Sammlungen den Überblick behalten
Sie können Inhalte basierend auf Ihren Einstellungen speichern und kategorisieren.
Über Autorisierungsprotokolle
Ihre Anwendung muss OAuth 2.0 verwenden, um Anfragen zu autorisieren. Es werden keine anderen Autorisierungsprotokolle unterstützt. Wenn deine Anwendung Über Google anmelden verwendet, werden einige Schritte der Autorisierung automatisch ausgeführt.
Anfragen mit OAuth 2.0 autorisieren
Die Details dieses Autorisierungsvorgangs oder -ablaufs für OAuth 2.0 können abhängig davon, welche Art von Anwendung Sie schreiben, variieren. Der folgende allgemeine Ablauf gilt für alle Anwendungstypen:
Wenn Sie Ihre Anwendung erstellen, registrieren Sie diese über die Google Cloud Console. Google stellt Ihnen dann die Informationen bereit, die Sie später benötigen, z. B. eine Client-ID und einen Clientschlüssel.
Aktivieren Sie die Google Cloud Deployment Manager V2 API in der Google Cloud Console. (Überspringen Sie diesen Schritt, falls die API nicht in der Google Cloud Console aufgeführt ist.)
Wenn Ihre Anwendung Zugriff auf Nutzerdaten benötigt, bittet sie Google um einen bestimmten Zugriffsbereich.
Dem Nutzer wird von Google ein Zustimmungsbildschirm angezeigt, auf dem er gebeten wird, Ihre Anwendung zu autorisieren, einige seiner Daten abzufragen.
Wenn der Nutzer zustimmt, erhält Ihre Anwendung von Google ein kurzlebiges Zugriffstoken.
Die Anwendung fordert Nutzerdaten an, wobei das Zugriffstoken an die Anfrage angehängt wird.
Stellt Google fest, dass Ihre Anfrage und das Token gültig sind, werden die angeforderten Daten zurückgegeben.
Einige Abläufe beinhalten zusätzliche Schritte, beispielsweise die Verwendung von Aktualisierungstokens, um neue Zugriffstokens zu erhalten. Weitere Informationen über die Abläufe für die unterschiedlichen Anwendungstypen finden Sie in der OAuth 2.0-Dokumentation.
Hier finden Sie Informationen zum OAuth 2.0-Bereich für Google Cloud Deployment Manager V2 API:
Bereich
Bedeutung
https://www.googleapis.com/auth/cloud-platform
Google Cloud Platform-Ressourcen betrachten, verwalten und erstellen.
Google Cloud Platform-Ressourcen betrachten und beziehen.
Zur Anforderung eines Zugriffs mit OAuth 2.0 benötigt Ihre Anwendung die Information zum Umfang sowie die Informationen, die Google bei der Registrierung Ihrer Anwendung bereitstellt (z. B. die Client-ID und den Clientschlüssel).
Tipp: Die Google API-Clientbibliotheken können einige Schritte des Autorisierungsvorgangs für Sie übernehmen. Diese sind in zahlreichen Programmiersprachen verfügbar. Weitere Informationen dazu finden Sie auf der Seite mit Bibliotheken und Beispielen.
[[["Leicht verständlich","easyToUnderstand","thumb-up"],["Mein Problem wurde gelöst","solvedMyProblem","thumb-up"],["Sonstiges","otherUp","thumb-up"]],[["Schwer verständlich","hardToUnderstand","thumb-down"],["Informationen oder Beispielcode falsch","incorrectInformationOrSampleCode","thumb-down"],["Benötigte Informationen/Beispiele nicht gefunden","missingTheInformationSamplesINeed","thumb-down"],["Problem mit der Übersetzung","translationIssue","thumb-down"],["Sonstiges","otherDown","thumb-down"]],["Zuletzt aktualisiert: 2025-04-21 (UTC)."],[[["\u003cp\u003eApplications must use OAuth 2.0 for authorization, as no other protocols are supported.\u003c/p\u003e\n"],["\u003cp\u003eThe OAuth 2.0 process involves registering your application with Google, requesting a specific scope of access, and receiving user consent.\u003c/p\u003e\n"],["\u003cp\u003eUpon user approval, Google grants a short-lived access token that your application uses to request data.\u003c/p\u003e\n"],["\u003cp\u003eThe Google Cloud Deployment Manager V2 API has two scopes: one for managing resources and another for read-only access.\u003c/p\u003e\n"],["\u003cp\u003eGoogle APIs client libraries can simplify some aspects of the OAuth 2.0 authorization process.\u003c/p\u003e\n"]]],[],null,["# Authorizing Requests\n\n### About authorization protocols\n\nYour application must use [OAuth 2.0](https://developers.google.com/identity/protocols/OAuth2) to authorize requests. No other authorization protocols are supported. If your application uses [Sign In With Google](https://developers.google.com/identity/gsi/web), some aspects of authorization are handled for you.\n\n### Authorizing requests with OAuth 2.0\n\nThe details of the authorization process, or \"flow,\" for OAuth 2.0 vary somewhat depending on what kind of application you're writing. The following general process applies to all application types:\n\n1. When you create your application, you register it using the [Google Cloud console](https://console.cloud.google.com/). Google then provides information you'll need later, such as a client ID and a client secret.\n2. Activate the Google Cloud Deployment Manager V2 API in the Google Cloud console. (If the API isn't listed in the Google Cloud console, then skip this step.)\n3. When your application needs access to user data, it asks Google for a particular **scope** of access.\n4. Google displays a **consent screen** to the user, asking them to authorize your application to request some of their data.\n5. If the user approves, then Google gives your application a short-lived **access token**.\n6. Your application requests user data, attaching the access token to the request.\n7. If Google determines that your request and the token are valid, it returns the requested data.\n\nSome flows include additional steps, such as using **refresh tokens** to acquire new access tokens. For detailed information about flows for various types of applications, see Google's [OAuth 2.0 documentation](https://developers.google.com/identity/protocols/OAuth2).\n\nHere's the OAuth 2.0 scope information for the Google Cloud Deployment Manager V2 API:\n\nTo request access using OAuth 2.0, your application needs the scope information, as well as\ninformation that Google supplies when you register your application (such as the client ID and the\nclient secret).\n\n**Tip:** The Google APIs client libraries can handle some of the authorization process for you. They are available for a variety of programming languages; check the [page with libraries and samples](/deployment-manager/latest/libraries) for more details."]]