Issue service account secret
POST/orgs/:orgId/service-accounts/:saId/secrets
Issues a new client secret for the service account identified by the given saId, for use with the OAuth 2.0 client_credentials grant. The secret value is returned only in this response. A service account holds at most 2 live secrets: to rotate, issue a second secret, then revoke the old one. Returns 409 if the service account already has 2 live secrets or is disabled. Available only when service account credentials are enabled for the organization; otherwise returns 404. Requires the organization:write permission.
Request
Responses
- 201
- 400
- 403
- 404
- 409
Created
Bad request: expiryDays is not an accepted lifetime
Operation not allowed
Service account not found, or service account credentials are not enabled for this organization
The service account already has 2 live secrets, or is disabled