Regenerate Client Secret
  • 12 Dec 2023
  • 1 Minute to read
  • Dark
    Light
  • PDF

Regenerate Client Secret

  • Dark
    Light
  • PDF

Article Summary

Post
/env-mgmt/1.0/api-key/clients/{id}/secrets

This API enables users to regenerate a new secret for a specific Client Credential by the ClientID. This method invalidates the previous secret.

Notice

Accessing the Policy Management APIs is through a dedicated domain/URL according to your PlainID Tenant Location:
`https://api.{REGION}.plainid.io`

United States (US) - `https://api.us1.plainid.io`
Canada (US) - `https://api.ca1.plainid.io`
Europe (US) - `https://api.eu1.plainid.io`
Replace`{REGION}` with your PlainID Tenant region (e.g. us1, eu1, ca1, etc.).
Security
Http
Type bearer
For more details about Management API Authentication, check out the Management APIs Authentication Article
Provide your bearer token in the Authorization header when making requests to protected resources.
Example: `Authorization: Bearer 123`
Path parameters
id
stringRequired

Client ID to regenerate the Client Secret for.

Responses
200

Client

id
string
ownerId
string (UUID)
ownerType
string
name
string
description
string
secret
string
tokenDuration
string (ISO-8601 duration)
permission
string
403

Forbidden

forbidden environment
{
  "id": {
    "type": "string",
    "example": "EW62XA",
    "description": "ID for Error Instance"
  },
  "status": {
    "enum": [
      "403"
    ]
  },
  "name": {
    "type": "string",
    "enum": [
      "forbiddenEnvironment"
    ]
  },
  "message": {
    "type": "string",
    "enum": [
      "operation get for resource Environment {ownerId} is not allowed because the current user does not have the appropriate permissions"
    ]
  }
}
forbidden tenant
{
  "id": {
    "type": "string",
    "example": "EW63XA",
    "description": "ID for Error Instance"
  },
  "status": {
    "enum": [
      "403"
    ]
  },
  "name": {
    "type": "string",
    "enum": [
      "forbiddenTenant"
    ]
  },
  "message": {
    "type": "string",
    "enum": [
      "operation get for resource Environment {ownerId} is not allowed because the current user does not have the appropriate permissions"
    ]
  }
}
Expand All
object
code
string
id
string
status
integer
name
string
message
string
args
object
path
string
404

Client not found

client not found
{
  "id": {
    "type": "string",
    "example": "EW64XA",
    "description": "ID for Error Instance"
  },
  "status": {
    "enum": [
      "404"
    ]
  },
  "name": {
    "type": "string",
    "enum": [
      "clientNotFoundError"
    ]
  },
  "message": {
    "type": "string",
    "enum": [
      "Client {name} not found"
    ]
  }
}
Expand All
object
code
string
id
string
status
integer
name
string
message
string
args
object
path
string

Was this article helpful?