Update Application Secret

POST {{apiPath}}/environments/{{envID}}/applications/{{appID}}/secret

Use the POST /environments/{{envID}}/applications/{{appID}}/secret operation to generate a new client_secret value for the specified application resource. This request supports optional parameters in the request body to designate the replaced secret as a previous secret that remains valid for a specified period, up to 30 days.

Best practices

  • Do not store an application secret in applications that are publicly available.

  • For security purposes, regenerate application secrets regularly.

  • If you suspect an application secret has been compromised, generate a new application secret immediately.

Prerequisites

Important: When you change your application's client secret, PingOne endpoints that use the client secret to authenticate requests must change to use the updated client secret value. Secret values must be updated for /as/token, /as/introspect, /as/par, and /as/revoke requests if the associated application specifies any of these tokenEndpointAuthMethod values:

  • CLIENT_SECRET_BASIC

  • CLIENT_SECRET_POST

  • CLIENT_SECRET_JWT

In addition, you must update any login_hint_token or request objects that use the client secret as the signing key.

Request Body

{"previous"=>{"expiresAt"=>"2024-01-02T13:54:34.487Z"}}

RESPONSES

status: OK

{"_links":{"self":{"href":"https://api.pingone.com/v1/environments/abfba8f6-49eb-49f5-a5d9-80ad5c98f9f6/applications/48567a65-8f00-4630-b8b0-2c02ce94168a/secret"},"environment":{"href":"https://api.pingone.com/v1/environments/abfba8f6-49eb-49f5-a5d9-80ad5c98f9f6"},"application":{"href":"https://api.pingone.com/v1/environments/abfba8f6-49eb-49f5-a5d9-80ad5c98f9f6/applications/48567a65-8f00-4630-b8b0-2c02ce94168a"}},"environment":{"id":"abfba8f6-49eb-49f5-a5d9-80ad5c98f9f6"},"secret":"vgUZQTEvg0Zzq6WxM73UN.TD","previous":{"secret":"9ZZd0Ih4ApbuIXvJtgRw","expiresAt":"2024-01-02T13:54:34.487Z"}}