Rotate environment client secret
const options = {method: 'POST', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api-staging.keystoneos.xyz/v1/platforms/me/environments/{environment_id}/rotate-secret', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://api-staging.keystoneos.xyz/v1/platforms/me/environments/{environment_id}/rotate-secret"
headers = {"Authorization": "Bearer <token>"}
response = requests.post(url, headers=headers)
print(response.text)curl --request POST \
--url https://api-staging.keystoneos.xyz/v1/platforms/me/environments/{environment_id}/rotate-secret \
--header 'Authorization: Bearer <token>'{
"client_id": "<string>",
"client_secret": "<string>",
"rotated_at": "2023-11-07T05:31:56Z"
}{
"detail": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>"
}
],
"code": "VALIDATION_ERROR",
"docs_url": "https://docs.keystoneos.xyz/guides/error-codes#validation-error"
}Environments
Rotate environment client secret
Requires the platform:security:manage scope (as an M2M scope or a user permission).
Rotate the Auth0 M2M client secret for the caller’s own environment. The new client_secret is returned exactly once in this response - Keystone never stores it and it cannot be retrieved again, only rotated again. Per Auth0’s documented rotation behavior, new secrets may be delayed up to thirty seconds while rotating; during this propagation window either the old or the new secret may be accepted, after which the old secret is no longer valid. Deploy the new secret promptly and expect tokens already issued to remain valid until they expire.
POST
/
v1
/
platforms
/
me
/
environments
/
{environment_id}
/
rotate-secret
Rotate environment client secret
const options = {method: 'POST', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api-staging.keystoneos.xyz/v1/platforms/me/environments/{environment_id}/rotate-secret', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://api-staging.keystoneos.xyz/v1/platforms/me/environments/{environment_id}/rotate-secret"
headers = {"Authorization": "Bearer <token>"}
response = requests.post(url, headers=headers)
print(response.text)curl --request POST \
--url https://api-staging.keystoneos.xyz/v1/platforms/me/environments/{environment_id}/rotate-secret \
--header 'Authorization: Bearer <token>'{
"client_id": "<string>",
"client_secret": "<string>",
"rotated_at": "2023-11-07T05:31:56Z"
}{
"detail": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>"
}
],
"code": "VALIDATION_ERROR",
"docs_url": "https://docs.keystoneos.xyz/guides/error-codes#validation-error"
}Authorizations
Auth0 JWT access token. See Authentication for details.
Path Parameters
Response
Successful Response