Send Docs Feedback

Revoking and approving developer app keys

 

This topic explains how to use the UI and APIs to revoke or approve API keys for products in developer apps and for developer apps. 

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 revoking access tokens.

Using the UI to revoke the key for a specific API product in a developer app

You can revoke the key associated with a specific API product through the management UI. The effect is that the API resources defined in that API product will no longer be accessible unless the key is re-approved.

  1. Log in to your Apigee Edge account. 
  2. From the main menu, select Publish > Developer apps.
  3. From the list of apps, select the one that contains the key you wish to revoke.
  4. In the Developer app page, click Edit
  5. In the Products section, click Revoke to revoke the key for the product you wish to revoke.

Tip: You can use the Get Developer App Details 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:

{
  "accessType": "",
  "appFamily": "default",
  "appId": "6ed3a4d1-4733-439a-80a4-0d71149ec9ad",
  "attributes": [
    {
      "name": "DisplayName",
      "value": "AnotherTestApp"
    },
    {
      "name": "Notes",
      "value": ""
    }
  ],
  "callbackUrl": "",
  "createdAt": 1415728893126,
  "createdBy": "wwitman@apigee.com",
  "credentials": [
    {
      "apiProducts": [
        {
          "apiproduct": "Weather-Product",
          "status": "revoked"
        }
      ],
      "attributes": [],
      "consumerKey": "giIC9Au6XP82wJ1oxZuQU4L75OdNKLhb",
      "consumerSecret": "SXg8JizqeTA8j3gX",
      "expiresAt": -1,
      "issuedAt": 1415728893154,
      "scopes": [],
      "status": "approved"
    }
  ],
  "developerId": "Z2S37rxX2Suzkwtg",
  "lastModifiedAt": 1420682967414,
  "lastModifiedBy": "wwitman@apigee.com",
  "name": "AnotherTestApp",
  "scopes": [],
  "status": "approved"
}

 

Using the UI to approve the key for a specific API product in a developer app

You can approve a previously revoked consumer key for an API product in a developer app through the management UI. The client app will once again be able to access the APIs in that product. 

  1. Log in to your Apigee Edge account. 
  2. From the main menu, select Publish > Developer apps.
  3. From the list of apps, select the one that contains the key you wish to revoke.
  4. In the Developer app page, click Edit
  5. In the Products section, click Approve to reinstate the key. 

 

Revoking and approving keys for API products with the Edge API

Edge provides APIs that let you manage API key status, depending on your use case. In the developer app JSON below, the location of each approve/revoke flag is indicated for each of these three cases:

  • (1) Revoking/approving keys for specific API products in a developer app. This API does exactly what the UI operations described previously in this topic do. See Approve or Revoke API Product for a Key for a Developer App.
  • (2) Revoking/approving specific key for a developer app. 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 Edge checks the status of the app key first. If the status is set to "revoked," Apigee Edge will not allow the call go through. See Approve or Revoke Specific Key of Developer App.
  • (3) Revoke/approve the API key status of an entire developer app. A revoked app cannot access any API products and cannot invoke any API managed by Apigee Edge. See Approve or Revoke Developer App.
{
  "accessType": "",
  "appFamily": "default",
  "appId": "6ed3a4d1-4733-439a-80a4-0d71149ec9ad",
  "attributes": [
    {
      "name": "DisplayName",
      "value": "AnotherTestApp"
    },
    {
      "name": "Notes",
      "value": ""
    }
  ],
  "callbackUrl": "",
  "createdAt": 1415728893126,
  "createdBy": "wwitman@apigee.com",
  "credentials": [
    {
      "apiProducts": [
        {
          "apiproduct": "Weather-Product",
          "status": "revoked" // (1)
        }
      ],
      "attributes": [],
      "consumerKey": "giIC9Au6XP82wJ1oxZuQU4L75OdNKLhb",
      "consumerSecret": "SXg8JizqeTA8j3gX",
      "expiresAt": -1,
      "issuedAt": 1415728893154,
      "scopes": [],
      "status": "approved" // (2) 
    }
  ],
  "developerId": "Z2S37rxX2Suzkwtg",
  "lastModifiedAt": 1420682967414,
  "lastModifiedBy": "wwitman@apigee.com",
  "name": "AnotherTestApp",
  "scopes": [],
  "status": "approved" // (3)
}

Help or comments?