Cet article explique comment utiliser l'UI et les API pour révoquer ou approuver les clés API d'applications de développeur et des produits qu'elles contiennent.
Utiliser l'UI pour révoquer la clé d'un produit d'API spécifique dans une application de développeur
Vous pouvez révoquer la clé associée à un produit d'API spécifique via l'UI. Il en résulte que les ressources d'API définies dans ce produit d'API ne seront plus accessibles, sauf si la clé est de nouveau approuvée.
Pour révoquer la clé à l'aide de l'UI Apigee, procédez comme suit :
Sélectionnez Publier > Applications dans la barre de navigation de gauche.
Sélectionnez l'application contenant la clé que vous souhaitez révoquer.
Cliquez sur l'icône de modification .
Dans la section "Identifiants", sélectionnez Révoquer dans le menu déroulant "État".
Utiliser l'UI pour approuver la clé d'un produit d'API spécifique dans une application de développeur
Vous pouvez approuver une clé client précédemment révoquée pour un produit d'API dans une application de développeur via l'UI Apigee. L'application cliente pourra à nouveau accéder aux API dans ce produit.
Pour approuver une clé de produit d'API, procédez comme suit :
Dans le menu principal, sélectionnez Publish > Apps (Publier > Applications).
Dans la liste des applications, sélectionnez celle qui contient la clé que vous souhaitez approuver.
Cliquez sur l'icône de modification .
Dans la section "Credentials" (Identifiants), sélectionnez l'option Approve (Approuver) du menu déroulant "Status" (État).
Révoquer et approuver des clés pour les produits d'API avec l'API Apigee
Apigee fournit des API vous permettant de gérer l'état des clés API en fonction de votre cas d'utilisation. Dans le code JSON de l'application de développeur ci-dessous, l'emplacement de chaque option d'approbation/de révocation est indiqué pour chacun des trois cas suivants :
(1) Indique l'état des clés d'un produit API spécifique dans une application de développeur. Cette API effectue exactement les opérations UI décrites précédemment dans cet article. Reportez-vous à l'API permettant d'approuver ou de révoquer la clé client d'une application.
(2) Indique l'état de la clé d'une application de développeur. Si vous révoquez la clé, l'application ne peut plus l'utiliser pour accéder à une API. Tous les jetons d'accès associés à une clé d'application révoquée restent actifs, mais Apigee vérifie d'abord l'état de cette clé. Si l'état est défini sur "révoqué", Apigee n'autorise pas l'appel. Reportez-vous à l'API permettant d'approuver ou de révoquer une clé API pour une application de développeur.
(3) Indique l'état de toutes les clés associées à une application de développeur. Une application révoquée ne peut accéder à aucun produit d'API et ne peut pas appeler une API gérée par Apigee. Reportez-vous à l'API permettant d'approuver ou de révoquer toutes les clés d'une application de développeur.
Sauf indication contraire, le contenu de cette page est régi par une licence Creative Commons Attribution 4.0, et les échantillons de code sont régis par une licence Apache 2.0. Pour en savoir plus, consultez les Règles du site Google Developers. Java est une marque déposée d'Oracle et/ou de ses sociétés affiliées.
Dernière mise à jour le 2025/09/03 (UTC).
[[["Facile à comprendre","easyToUnderstand","thumb-up"],["J'ai pu résoudre mon problème","solvedMyProblem","thumb-up"],["Autre","otherUp","thumb-up"]],[["Difficile à comprendre","hardToUnderstand","thumb-down"],["Informations ou exemple de code incorrects","incorrectInformationOrSampleCode","thumb-down"],["Il n'y a pas l'information/les exemples dont j'ai besoin","missingTheInformationSamplesINeed","thumb-down"],["Problème de traduction","translationIssue","thumb-down"],["Autre","otherDown","thumb-down"]],["Dernière mise à jour le 2025/09/03 (UTC)."],[[["\u003cp\u003eThis page explains how to revoke or approve API keys for products in developer apps and for entire developer apps, within Apigee and Apigee hybrid.\u003c/p\u003e\n"],["\u003cp\u003eYou can revoke access to specific API resources defined within an API product by revoking the associated key through the Apigee UI or via API calls.\u003c/p\u003e\n"],["\u003cp\u003eThe Apigee UI allows you to approve or revoke a key associated with a specific API product, found within a given developer app, reinstating access to the defined APIs.\u003c/p\u003e\n"],["\u003cp\u003eApigee provides REST APIs to manage API key statuses, allowing you to revoke or approve keys at the API product level, the developer app key level, or for all keys associated with an entire developer app.\u003c/p\u003e\n"],["\u003cp\u003eYou can check the status of a revoked API product or developer app by using the "Get Developer App Details" API, which will return a JSON that contains the current status of the target entity.\u003c/p\u003e\n"]]],[],null,["# Revoking and approving developer app keys\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\nThis topic explains how to use the UI and APIs to revoke or approve API keys for products in\ndeveloper apps and for developer apps.\n| **Note:** If you need to revoke an access token, you can do that directly by calling a properly configured OAuthV2 endpoint. For details, see [Approving and\n| revoking access tokens](/apigee/docs/api-platform/security/oauth/validating-and-invalidating-access-tokens).\n\nUsing the UI to revoke the\nkey for a specific API product in a developer app\n----------------------------------------------------------------------------\n\nYou can revoke the key associated with a specific API product through the UI. The\neffect is that the API resources defined in that API product will no longer be accessible unless\nthe key is re-approved.\n\n\nTo revoke the key using the Apigee UI:\n\n1. Open the [Apigee UI](https://apigee.google.com).\n2. Select **Publish \\\u003e Apps** in the left navigation bar.\n3. Select the app that contains the key you wish to revoke.\n4. Click the Edit icon .\n5. In the Credentials section, select **Revoke** in the Status drop-down menu.\n\n| **Tip:** You can use the [Get\n| Developer App Details](/apigee/docs/reference/apis/apigee/rest/v1/organizations.developers.apps/get) API to get the JSON representation of a developer app to discover the approval status of products in that app. In the following JSON representation of a developer app, you can see where the API Product called \"Weather-Product\" has been revoked: \n|\n| ```transact-sql\n| {\n| \"accessType\": \"\",\n| \"appFamily\": \"default\",\n| \"appId\": \"6ed3a4d1-4733-439a-80a4-0d71149ec9ad\",\n| \"attributes\": [\n| {\n| \"name\": \"DisplayName\",\n| \"value\": \"AnotherTestApp\"\n| },\n| {\n| \"name\": \"Notes\",\n| \"value\": \"\"\n| }\n| ],\n| \"callbackUrl\": \"\",\n| \"createdAt\": 1415728893126,\n| \"createdBy\": \"wwitman@apigee.com\",\n| \"credentials\": [\n| {\n| \"apiProducts\": [\n| {\n| \"apiproduct\": \"Weather-Product\",\n| \"status\": \"revoked\"\n| }\n| ],\n| \"attributes\": [],\n| \"consumerKey\": \"giIC9Au6XP82wJ1oxZuQU4L75OdNKLhb\",\n| \"consumerSecret\": \"SXg8JizqeTA8j3gX\",\n| \"expiresAt\": -1,\n| \"issuedAt\": 1415728893154,\n| \"scopes\": [],\n| \"status\": \"approved\"\n| }\n| ],\n| \"developerId\": \"Z2S37rxX2Suzkwtg\",\n| \"lastModifiedAt\": 1420682967414,\n| \"lastModifiedBy\": \"wwitman@apigee.com\",\n| \"name\": \"AnotherTestApp\",\n| \"scopes\": [],\n| \"status\": \"approved\"\n| }\n| ```\n\nUsing the UI to approve\nthe key for a specific API product in a developer app\n-----------------------------------------------------------------------------\n\nYou can approve a previously revoked consumer key for an API product in a developer app\nthrough the Apigee UI. The client app will once again be able to access the APIs in that\nproduct.\n\n**To approve an API product key:**\n\n1. Open the [Apigee UI](https://apigee.google.com).\n2. From the main menu, select **Publish \\\u003e Apps**.\n3. From the list of apps, select the one that contains the key you wish to approve.\n4. Click the Edit icon .\n5. In the Credentials section, select **Approve** in the Status drop-down menu.\n\nRevoking and approving keys for API\nproducts with the Apigee API\n----------------------------------------------------------------\n\nApigee provides APIs that let you manage API key status, depending on your use case. In the\ndeveloper app JSON below, the location of each approve/revoke flag is indicated for each of these\nthree cases:\n\n- (1) Shows key status for a specific API product in a developer app. This API does exactly what the UI operations described previously in this topic do. See the API for [approving or revoking an app's consumer key.](/apigee/docs/reference/apis/apigee/rest/v1/organizations.developers.apps.keys.apiproducts/updateDeveloperAppKeyApiProduct).\n- (2) Shows key status for a developer app key. Revoking the key renders it unusable for the app to use it to access an API. Any access tokens associated with a revoked app key will remain active, but Apigee checks the status of the app key first. If the status is set to \"revoked,\" Apigee will not allow the call go through. See the API for [approving or revoking an API key for a developer app](/apigee/docs/reference/apis/apigee/rest/v1/organizations.developers.apps.keys/updateDeveloperAppKey).\n- (3) Shows the key status for all keys associated with a developer app. A revoked app cannot access any API products and cannot invoke any API managed by Apigee. See the API for [approving or revoking all keys for a developer app](/apigee/docs/reference/apis/apigee/rest/v1/organizations.developers.apps/generateKeyPairOrUpdateDeveloperAppStatus).\n\n```transact-sql\n{\n \"accessType\": \"\",\n \"appFamily\": \"default\",\n \"appId\": \"6ed3a4d1-4733-439a-80a4-0d71149ec9ad\",\n \"attributes\": [\n {\n \"name\": \"DisplayName\",\n \"value\": \"AnotherTestApp\"\n },\n {\n \"name\": \"Notes\",\n \"value\": \"\"\n }\n ],\n \"callbackUrl\": \"\",\n \"createdAt\": 1415728893126,\n \"createdBy\": \"wwitman@apigee.com\",\n \"credentials\": [\n {\n \"apiProducts\": [\n {\n \"apiproduct\": \"Weather-Product\",\n \"status\": \"revoked\" // (1)\n }\n ],\n \"attributes\": [],\n \"consumerKey\": \"giIC9Au6XP82wJ1oxZuQU4L75OdNKLhb\",\n \"consumerSecret\": \"SXg8JizqeTA8j3gX\",\n \"expiresAt\": -1,\n \"issuedAt\": 1415728893154,\n \"scopes\": [],\n \"status\": \"approved\" // (2) \n }\n ],\n \"developerId\": \"Z2S37rxX2Suzkwtg\",\n \"lastModifiedAt\": 1420682967414,\n \"lastModifiedBy\": \"wwitman@apigee.com\",\n \"name\": \"AnotherTestApp\",\n \"scopes\": [],\n \"status\": \"approved\" // (3)\n}\n```"]]