Method: organizations.developers.apps.updateKeyPair

(2) Create new developer KeyPairs Generates a new consumer key and consumer secret for the named developer app. Rather than replacing an existing key, this API call generates a new key. For example, 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. After using this API, multiple key pairs will be associated with a single app. Each key pair has an independent status (revoked or approved) and an independent expiry time. Any non-expired, approved key can be used in an API call. The keyExpiresIn value is in milliseconds. A value of -1 means the key/secret pair never expire.

HTTP request

POST https://apigee.googleapis.com/v1/{name=organizations/*/developers/*/apps/*}

The URL uses gRPC Transcoding syntax.

Path parameters

Parameters
name

string

Required. Developer App name of the form: organizations/{organizationId}/developers/{developerId}/apps/{appName}

Query parameters

Parameters
action

string

Set the action to approve or revoke.

Request body

The request body contains an instance of KeyPairForApp.

Response body

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

Authorization Scopes

Requires the following OAuth scope:

  • https://www.googleapis.com/auth/cloud-platform

KeyPairForApp

JSON representation
{
  "attributes": [
    {
      object (Attribute)
    }
  ],
  "name": string,
  "callbackUrl": string,
  "apiProducts": [
    string
  ],
  "scopes": [
    string
  ],
  "keyExpiresIn": string
}
Fields
attributes[]

object (Attribute)

Arbitrary name/value attributes that may be used for customizing profile information or for developer app-specific processing.

name

string

The name of the developer app. The name becomes the unique ID of the developer app for this organization and developer.

callbackUrl

string

The callbackUrl is used by OAuth 2.0 authorization servers to communicate authorization codes back to developer apps.

apiProducts[]

string

A list of api products this app is associated with.

scopes[]

string

The scopes to apply to the app. The specified scope names must already exist on the API product that you associate with the app.

keyExpiresIn

string (int64 format)

The number of milliseconds after which the key pair expires json key: keyExpiresIn