Delete the legacy secret for the application and replace it with an internal secret used only by Logto. The internal secret is not returned by Management APIs and cannot be used for client authentication.
DELETE
/api/applications/{id}/legacy-secret
curl \
--request DELETE 'https://[tenant_id].logto.app/api/applications/{id}/legacy-secret' \
--header "Authorization: Bearer $ACCESS_TOKEN"
Response examples (200)
{
"tenantId": "string",
"id": "string",
"name": "string",
"secret": "string",
"description": "string",
"type": "Native",
"oidcClientMetadata": {
"redirectUris": [
{}
],
"postLogoutRedirectUris": [
{}
],
"backchannelLogoutUri": "string",
"backchannelLogoutSessionRequired": true,
"logoUri": "string"
},
"customClientMetadata": {
"corsAllowedOrigins": [
"string"
],
"idTokenTtl": 42.0,
"refreshTokenTtl": 42.0,
"refreshTokenTtlInDays": 42.0,
"tenantId": "string",
"alwaysIssueRefreshToken": true,
"rotateRefreshToken": true,
"allowTokenExchange": true,
"isDeviceFlow": true,
"maxAllowedGrants": 42.0
},
"protectedAppMetadata": {
"host": "string",
"origin": "string",
"sessionDuration": 42.0,
"pageRules": [
{
"path": "string"
}
],
"additionalScopes": [
"custom_data"
],
"customDomains": [
{
"domain": "string",
"status": "PendingVerification",
"errorMessage": "string",
"dnsRecords": [
{
"name": "string",
"type": "string",
"value": "string"
}
],
"cloudflareData": {
"id": "string",
"status": "string",
"ssl": {
"status": "string",
"validation_errors": [
{
"message": "string"
}
]
},
"verification_errors": [
"string"
]
}
}
]
},
"customData": {},
"isThirdParty": true,
"appLevelAccessControlEnabled": true,
"createdAt": 42.0
}