Complete the rotation of an M2M client secret started with the Start Secret Rotation Endpoint. After this endpoint is called, the client's next_client_secret becomes its client_secret and the previous client_secret will no longer be valid.
Rotate M2M Client Secret
POSThttps://test.stytch.com/v1/m2m/clients/{client_id}/secrets/rotate
Path parameters
client_id* string
Response fields
status_code int
request_id string
m2m_client object
curl --request POST \
--url https://test.stytch.com/v1/m2m/clients/m2m-client-test-d731954d-dab3-4a2b-bdee-07f3ad1be885/secrets/rotate \
-u 'PROJECT_ID:SECRET'
RESPONSE
200
{
"status_code": 200,
"request_id": "request-id-test-b05c992f-ebdc-489d-a754-c7e70ba13141",
"m2m_client": {
"client_id":"m2m-client-test-d731954d-dab3-4a2b-bdee-07f3ad1be885",
"client_name":"Example client name",
"client_description":"Example client description.",
"client_secret_last_four":"DzJj",
"next_client_secret_last_four":null,
"status":"active",
"scopes":["read:users","write:users"],
"trusted_metadata":{}
}
}