Generate a signing secret Beta
This endpoint is in beta. Its request and response may change.
Generates a signing secret for an app that doesn't sign its events (provides_bearer_secret is true on its triggers), and returns it once. A generated secret starts with skwh_. Give it to the app, which sends it with every event: in an Authorization: Bearer header, in the X-Scalekit-Webhook-Secret header, or as the last segment of url_with_secret when the app can't set a header. Store it with your server's secrets now; it's never returned again. If a secret already exists, a new one starts a rotation. An app that signs its own events takes its secret through Set a signing secret instead.
Authorization
Authorization: Bearer $TOKEN, an access token from the client credentials grant. See Authentication.
Path parameters
connection_idstringrequiredscalekit_client.actions.triggers.generate_signing_secret
Generate a signing secret, for providers that use one Scalekit creates. The secret is returned in plaintext only in this response; it is left out of repr(). Not retried on UNAVAILABLE: a retry would replace the secret.
scalekit_client.actions.triggers.generate_signing_secret( connection_id: str,) -> GenerateTriggerSigningSecretResponseParameters
connection_idstrrequiredconn_...).Returns GenerateTriggerSigningSecretResponse: The endpoint, the secret and the URL that includes it.
From scalekit-sdk-python 2.23.0.
Response 200
endpointobjectShow 8 child attributes
connection_idstringidstringmasked_signing_secretstringprevious_signing_secret_expires_atstringrotation_in_progressbooleansigning_secret_configuredbooleansigning_secret_rotation_idstringurlstringsigning_secretstringAuthorization: Bearer <secret> header, the X-Scalekit-Webhook-Secret header, or the final path segment of url_with_secret.url_with_secretstringErrors
Every error has the same body: code, message and details. See Errors and rate limits.
400Invalid request, nothing written - connection_id is not a valid connection ID; the connection's provider signs its own events, so its secret is copied from the provider's app configuration and stored with Set a signing secret instead (error_code TRIGGER_SIGNING_SECRET_NOT_GENERATABLE); or the provider's webhook trigger definitions are temporarily unavailable (error_code TRIGGER_INGRESS_DEFINITIONS_UNAVAILABLE)404Not found - no webhook URL has been created for this connection yet (error_code TRIGGER_INGRESS_ENDPOINT_NOT_CREATED; call Create a webhook URL first), the connection does not exist in this environment (error_code RESOURCE_NOT_FOUND), or Triggers isn't turned on for your environment (error_code RESOURCE_NOT_FOUND)409Conflict - a rotation is already in progress. Confirm it with Confirm a signing secret rotation, or wait for the previous secret's expiry, before generating another secret500Internal error - the secret could not be generated or stored, or the endpoint could not be read back; retry the request