Skip to Content
ZITADEL Docs
APIsCore ResourcesV2User

Add a Users Secret

Generates a client secret for the user. The client id is the users username. If the user already has a secret, it is overwritten. Only users of type machine can have a secret.

Required permission:

  • user.write
POST
/v2/users/{user_id}/secret

Path Parameters

user_id*user_id

Response Body

Success

application/json
  1. response
creationDate?creation_date

The timestamp of the secret creation.

Formatdate-time
clientSecret?client_secret

The client secret. Store this secret in a secure place. It is not possible to retrieve it again.

Example Request
curl -X POST 'https://example.com/v2/users/string/secret'
Example Response200
{  "creationDate": "2023-01-15T01:30:15.01Z",  "clientSecret": "string"}

Was this page helpful?