This page applies to Apigee and Apigee hybrid.
View Apigee Edge documentation.
This section describes how to register apps and manage API keys.
Overview
The primary way to control who can access your APIs is through application registration.
As an API provider, you create one or more API products that bundle your APIs into service tiers. API products let you limit traffic and access levels at very granular levels. When you create an API product, you can set the access level to Public, Private, or Internal only. For more information, see Access level.
When registering an app, the app developer selects which API products to use and Apigee provides a single API key that the developer uses to access those API products. The app developer passes the API key in each call to the API proxies contained in the API products. At any time, you can revoke an app's API key, preventing an app developer from accessing all or a subset of API products referenced by that app.
Typically, app developers register to use your API products using your developer portal. The steps to build your portal and publish your API products are described in Build your portal.
You can have more control over the app registration process by registering your apps using the Apigee in Cloud console or Apigee API instead. For example, you may want to register apps for your internal development teams or for a developer that cannot access your portal.
The following sections describe how to register apps and manage API keys using the UI and API.
Exploring the Apps page
To view and register apps, and manage API keys in the Apigee UI you use the Apps view.
Go to the Apps page in the Apigee in Cloud console:
The Apps view lets you do the following:
- Register an app
- View and edit an app
- Manage credentials
- Approve or revoke an app
- Delete an app
- Search the list of apps by name, developer, app ID, consumer API key, or all content
Registering an app
An app can be registered in the following ways:
- By an app developer: An app developer can register the app via your portal, as described in How app developers interact with your portal.
- By an administrator: You can register an app in Apigee, as described below. It is up to you to determine how to provide the key to the app developer.
Registered apps are added to the following:
- List of registered apps in Apigee. See Viewing and editing developer details.
- Apps page in the developer portal.
To register an app in Apigee:
- Go to the Apps page:
- Click Create.
- Specify the App Details, as described in the following table:
Field Description Required? Name Name of the app. You can't change the name once the app is created. This name is used in Apigee API calls. Required Display Name Display name for the app that appears in the Apigee UI and the developer portal. Optional Developer Select a developer name from the drop-down.
Note: For performance reasons, not all developers are displayed in the drop-down. Start typing the developer name or email in the search box, and the drop-down values are automatically refined to match the text you are typing. See also Register app developers.
Required Callback URL Typically specifies the URL of an app that is designated to receive an authorization code on behalf of the client app. This value is not required for all API products. Optional Notes Descriptive notes for the app. Optional - Specify the Credentials, including the API key expiration and status and the
associated API products. In the Credentials section, click
Field Description Expiry Configure an expiration duration or date, or set the API key to never expire, and click OK. Products Associate one or more API products with the API key: - Click Add products.
- Select one or more API products from list.
- Click OK.
- Click Add.
Add credential and enter the following information:
- Set the Status to Approved or Revoked for each API product. If you added an API product
to the credential that requires manual approval, it will show
Pending approval status
. Otherwise, it will showApproved
. In this step, you can change the approval status.- From the list of Products in the Credentials section, select one or more products from the list.
- Click Approve or Revoke.
- Specify the Custom Attributes:
- In the Custom Attributes section, click Add attribute.
- Enter the name and value.
- Click Add or Add & Start another. The maximum number of custom attributes that you can add is 18.
- Click Create.
If the API products you associated with the app required manual approval for their API keys, approve them, as described in Approving or revoking API keys.
Viewing apps registered for a developer
To view apps registered for a specific developer, use one of the following methods:
- View all registered apps, select Developer in the Search drop-down, and enter the name of the developer in the search field.
- View all registered app developers and click the row associated with the developer.
Viewing and editing an app
To view and edit an app:
- Go to the Apps page:
- Click anywhere in the row of the app that you want to view and edit. Apigee displays the app details.
- To edit an app, click Edit.
- Perform one or more of the following tasks:
- Modify the app details, including the name, callback URL, or notes.
- Manage the credentials and associated products.
- Add or delete custom attributes. The maximum number of custom attributes that you can add is 18.
- Approve or revoke the app.
- Click Save.
Managing credentials
When editing an app, you can manage its credentials in the Credentials section, where you can perform the following tasks using the UI:
- View an API key and secret
- Approve or revoke an API key for all associated API products or for a single API product.
- Manage API products in an app
- Generate new credentials
To use the API to manage credentials, see Import existing consumer keys and secrets.
Viewing an API key and secret
To view an API key and secret:
- Go to the Apps page:
- Click in the row of the app for which you want to view the API key and secret.
- In the Credentials section, click the associated with the API key or secret that you want to view.
Approving or revoking an API key
API calls to API proxies usually require an API key. Apigee allows the calls only if the API key is approved, valid, and meets the conditions defined by the API product containing the API.
You can configure an API product for automatic approval of API keys, as described in Managing API products. However, if the API product requires manual approval of API keys, you need to manually approve the key.
You can revoke an API key for all or a single API product. In this case, the API key and secret are invalid and cannot be used to access APIs in the associated API product(s). You can re-approve an API key at any time.
To approve or revoke an API key:
- Go to the Apps page:
- Click in the row of the app that you want to view and edit.
- Click Edit.
- To approve or revoke an API key, select Approved or Revoked in the Status section for the credential.
- Click Save.
Managing API products in an app
Manage API products in your app by performing the following tasks:
Adding an API product to an app
To add an API product to an app:
- Go to the Apps page:
- Click in the row of the app that you want to view and edit.
- Click Edit.
- Perform one of the following tasks:
- To add an API product to a new API key, click Add credential to generate a new credential, select an expiration, and add the API product to the API key.
- To add an API product or products to an existing API key, in the Credential section click Add products and select one or more API products from the drop-down list.
- Click Save.
Revoking or removaing an API product from an app credential
If you want to keep an API key active but not allow it to be used by an API product, you can revoke it or remove it from the associated credential.
- Go to the Apps page:
- Click in the row of the app that you want to view and edit.
- Click Edit.
- Select the API product (or products) to revoke or remove from the credential.
- Click Revoke or Remove.
- Click Save.
You can re-approve a revoked API product or re-add an API product that was removed.
Generating new credentials
You can generate new credentials for an app. For instance, if you're using API key rotation, you can generate new keys whose expiration overlaps keys that will be out of rotation when they expire. You might also generate a new key/secret if the security of the original key/secret is compromised. If you generate a new key, any existing API keys will continue to work until they expire or you explicitly revoke them.
To generate a new API key:
- Go to the Apps page:
- Click in the row of the app that you want to view and edit.
- Click Edit.
- In the Credentials section, click Add credential.
- Specify the expiration, add the API products, and set their status.
- Optionally, revoke any of the other API keys, as required.
- Click Save.
Approving or revoking an app
Approve or revoke an app, as described below. When you revoke an app, any approved API keys can no longer be used in API calls to Apigee. When you re-approve an app, all approved and valid API keys can be used to make API calls.
If the app is registered in other organizations, you must revoke it in each of those organizations. It may take a few minutes for the changes to be recognized by all message processors.
To approve or revoke an app:
- Go to the Apps page:
- Click in the row of the app that you want to view and edit.
- Click Edit.
- Select Approve or Revoke in the App Status field to approve or revoke the app, respectively.
- Click Save.
Deleting an app
When you delete an app, all client keys associated with the apps become invalid. Using an invalid key on a request causes the request to fail.
If you think you may want to reinstate a developer app in the future, an alternative to deletion is revoking an app.
To delete an app:
- Go to the Apps page:
- Position the cursor in the row of the app to delete.
- Click in the actions column.
Registering apps and managing API keys using the API
To register and manage apps using the Apigee API, use the following APIs:
See also Import existing consumer keys and secrets.