Mit dem Berechtigungstyp "Clientanmeldedaten" wird ein Verfahren zur Ausgabe von Zugriffstokens im Austausch für Anwendungsanmeldedaten festgelegt. Diese Anwendungsanmeldedaten sind das Consumer-Schlüssel und Secret-Paar, das Apigee für jede in einer Organisation registrierte Anwendung ausgibt. Weitere Informationen finden Sie unter Typ der Autorisierungscode-Zuweisung implementieren.
OAuth 2.0 zu einem neuen API-Proxy hinzufügen
Sie können die OAuth-Überprüfung zu einer API hinzufügen, wenn Sie einen neuen API-Proxy in der Apigee-Benutzeroberfläche erstellen.
So fügen Sie einer API die OAuth-Überprüfung hinzu:
Wählen Sie in der linken Navigationsleiste Develop > API Proxies aus.
Klicken Sie auf +Proxy.
Mit dem Assistenten "Proxy erstellen" können Sie einen Reverse-Proxy erstellen. Siehe Einfachen API-Proxy erstellen.
Klicken Sie auf der Seite Allgemeine Richtlinien des Assistenten auf das Optionsfeld neben OAuth v2.0.
Wenn Sie diese Option auswählen, werden dem neu erstellten API-Proxy zwei Richtlinien angehängt: eine zum Prüfen der Zugriffstokens und eine weitere, um das Zugriffstoken nach der Bestätigung zu entfernen.
Das Kästchen API-Produkt veröffentlichen ist auswählbar und wird automatisch ausgewählt. Klicken Sie dieses Kästchen an, wenn ein Produkt beim Erstellen des neuen API-Proxys automatisch generiert werden soll. Das automatisch erzeugte Produkt wird mit einer Verknüpfung zum neuen API-Proxy erstellt. Wenn Sie bereits ein Produkt haben, mit dem Sie diese neue API verknüpfen möchten, entfernen Sie das Häkchen aus diesem Kästchen, damit Sie kein unnötiges Produkt erstellen. Informationen zu Produkten finden Sie unter Was ist ein API-Produkt?
[[["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-09-05 (UTC)."],[[["\u003cp\u003eThis documentation applies to both Apigee and Apigee hybrid platforms.\u003c/p\u003e\n"],["\u003cp\u003eApigee uses app credentials, consisting of a consumer key and secret pair, to issue access tokens via the client credentials grant type.\u003c/p\u003e\n"],["\u003cp\u003eOAuth 2.0 verification can be added to a new API proxy during its creation in the Apigee UI.\u003c/p\u003e\n"],["\u003cp\u003eSelecting the OAuth 2.0 option during API proxy creation automatically attaches policies to verify and strip access tokens.\u003c/p\u003e\n"],["\u003cp\u003eYou can optionally auto-generate an API product linked to the new API proxy, or clear this option to associate it with an existing product.\u003c/p\u003e\n"]]],[],null,["# OAuth 2.0: Configuring a new API proxy\n\n*This page\napplies to **Apigee** and **Apigee hybrid**.*\n\n\n*View [Apigee Edge](https://docs.apigee.com/api-platform/get-started/what-apigee-edge) documentation.*\n\nThe client credentials grant type defines a procedure for issuing access tokens in exchange\nfor **app credentials** . These app credentials are the consumer key and secret\npair that Apigee issues for each app that is registered in an organization. For more\ndetails, see [Implementing\nthe authorization code grant type](/apigee/docs/api-platform/security/oauth/oauth-v2-policy-authorization-code-grant-type).\n\nAdd OAuth 2.0 to a new API proxy\n--------------------------------\n\nYou can add OAuth verification to an API when you create a new API proxy in the Apigee UI.\n\nTo add OAuth verification to an API:\n\n1. Sign in to [Apigee UI](https://apigee.google.com).\n2. Select **Develop \\\u003e API Proxies** in the left navigation bar.\n3. Click **+ Proxy**\n4. Use the Create Proxy wizard to create a Reverse proxy. See [Build a simple API\n proxy](/apigee/docs/api-platform/fundamentals/build-simple-api-proxy).\n5. On the **Common policies** page of the wizard, select the radio button next to **OAuth\n v2.0**.\n\nWhen you select this option, two policies will be attached to the\nnewly created API proxy, one to verify access tokens and another to strip the access token after\nit has been verified.\n\nNote that the **Publish API\nProduct** checkbox becomes selectable and is automatically selected. Check this if\nyou want to automatically generate a product when you build the new API proxy. The autogenerated\nproduct will be created with an association to the new API proxy. If you have an existing product\nwith which you want to associate this new API, be sure to clear this checkbox so that you don't\ncreate an unnecessary product. For information about products, see [What is an API product?](/apigee/docs/api-platform/publish/what-api-product)"]]