Skip to Content
ZITADEL Docs
APIsCore ResourcesV2Application

Generate Client Secret

Generates the client secret of an API or OIDC application that belongs to the input project.

Required permissions:

  • project.app.write
POST
/zitadel.application.v2.ApplicationService/GenerateClientSecret

Header Parameters

Connect-Protocol-Version*1

Define the version of the Connect protocol

Value in1
Connect-Timeout-Ms?Connect-Timeout-Ms

Define the timeout, in ms

Request Body

application/json
  1. body
applicationId*application_id

The unique ID of the application to generate a new client secret for.

projectId*project_id

The ID of the project the application belongs to.

Response Body

Success

application/json
  1. response
clientSecret?client_secret

The newly generated client secret. It must be stored safely, as it will not be possible to retrieve it again. A new client secret can be generated using this endpoint.

creationDate?creation_date

The timestamp of the creation of the new client secret.

Formatdate-time
Example Request
curl -X POST 'https://example.com/zitadel.application.v2.ApplicationService/GenerateClientSecret' \  -H 'Connect-Protocol-Version: 1' \  -H 'Content-Type: application/json' \  -d '{  "applicationId": "string",  "projectId": "string"}'
Example Response
{  "clientSecret": "string",  "creationDate": "2023-01-15T01:30:15.01Z"}

Was this page helpful?