AddPersonalAccessToken
Add a Personal Access Token
Personal access tokens (PAT) are the easiest way to authenticate to the Zitadel APIs. Make sure you store the returned PAT safely, as you won't be able to read it from the Zitadel API anymore. Only users of type machine can have personal access tokens.
Required permission:
- user.write
Path Parameters
user_id*string
The users resource ID.
Request Body
application/json
expirationDate?string
The timestamp when the token will expire.
Format
date-time[key: string]?never
Response Body
application/json
application/json
curl -X POST "https://loading/v2/users/string/pats" \ -H "Content-Type: application/json" \ -d '{}'{
"creationDate": "1s",
"tokenId": "string",
"token": "string"
}{
"code": "not_found",
"message": "string",
"detail": {
"type": "string",
"value": "string",
"debug": {}
}
}Was this page helpful?