Skip to main content

rotatePrivateAppSecret

Requires permission settings:apps:manage.

Issue a new client secret for a private app. The old secret keeps working for the grace window (24 hours by default, 7 days at most).

Errors: a failed call returns a GraphQL errors entry, not a field on the result, and data may be null or partial. Read the entry's extensions.code and message; every shape and code is in the Error reference.

Example:

mutation RotatePrivateAppSecret($input: RotatePrivateAppSecretInputGql!) {
rotatePrivateAppSecret(input: $input) {
clientId
clientSecret
previousSecretExpiresAt
}
}

Variables:

{
"input": {
"appId": "id"
}
}

Response:

{
"data": {
"rotatePrivateAppSecret": {
"clientId": "string",
"clientSecret": "string",
"previousSecretExpiresAt": "2025-01-15T00:00:00Z"
}
}
}
rotatePrivateAppSecret(
input: RotatePrivateAppSecretInputGql!
): PrivateAppSecretRotationResult!

Arguments​

rotatePrivateAppSecret.input ● RotatePrivateAppSecretInputGql! non-null input​

Which app, and how long the old secret keeps working.

Type​

PrivateAppSecretRotationResult object​

A rotated client secret. The new secret is shown only once; the old one keeps working until previousSecretExpiresAt.