Method: organizations.developers.apps.generateKeyPairOrUpdateDeveloperAppStatus

Manages access to a developer app by enabling you to:

  • Approve or revoke a developer app
  • Generate a new consumer key and secret for a developer app

To approve or revoke a developer app, set the action query parameter to approved or revoked, respectively, and the Content-Type header to application/octet-stream. If a developer app is revoked, none of its API keys are valid for API calls even though the keys are still approved. If successful, the API call returns the following HTTP status code: 204 No Content

To generate a new consumer key and secret for a developer app, pass the new key/secret details. Rather than replace an existing key, this API generates a new key. In this case, multiple key pairs may be associated with a single developer app. Each key pair has an independent status (approved or revoked) and expiration time. Any approved, non-expired key can be used in an API call.

For example, if you're using API key rotation, you can generate new keys with expiration times that overlap keys that are going to expire. You might also generate a new consumer key/secret if the security of the original key/secret is compromised.

The keyExpiresIn property defines the expiration time for the API key in milliseconds. If you don't set this property or set it to -1, the API key never expires.


  • When generating a new key/secret, this API replaces the existing attributes, notes, and callback URLs with those specified in the request. Include or exclude any existing information that you want to retain or delete, respectively.
  • To migrate existing consumer keys and secrets to hybrid from another system, see the keys.create API.

HTTP request


The URL uses gRPC Transcoding syntax.

Path parameters



Required. Name of the developer app. Use the following structure in your request: organizations/{org}/developers/{developer_email}/apps/{app}

Authorization requires the following IAM permission on the specified resource name:

  • apigee.developerapps.manage

Query parameters



Action. Valid values are approve or revoke.

Request body

The request body contains an instance of DeveloperApp.

Response body

If successful, the response body contains an instance of DeveloperApp.

Authorization Scopes

Requires the following OAuth scope: