For the complete documentation index, see llms.txt. This page is also available as Markdown.

Webhook's signature verification

To ensure the authenticity and integrity of webhook requests, Cakewalk signs each payload with a cryptographic signature. When your application receives a webhook, it must verify this signature using the public key provided by Cakewalk. The signature is included in the X-SIGNATURE header, and it is generated using the SHA hash of the raw request body, signed with Cakewalk’s private RSA key.

Your server retrieves the corresponding public key from the https://open-api.getcakewalk.io/api/Keys endpoint, using your API credentials for authorization. By verifying the signature against the raw payload using this public key, your application can confirm that the request was not tampered with and was genuinely sent by Cakewalk.

πŸ“¦ Project Structure

cakewalk_webhook/
β”œβ”€β”€ config.py
β”œβ”€β”€ signature_service.py
β”œβ”€β”€ models.py
β”œβ”€β”€ main.py
β”œβ”€β”€ requirements.txt

config.py β€” πŸ”§ Configuration

from pydantic import Field
from pydantic_settings import BaseSettings

class CakewalkSettings(BaseSettings):
    api_key: str = Field(..., alias="CAKEWALK_API_KEY")
    api_secret: str = Field(..., alias="CAKEWALK_API_SECRET")
    public_key_endpoint: str = "<https://open-api.getcakewalk.io/api/Keys>"

    class Config:
        env_file = ".env"

settings = CakewalkSettings()

signature_service.py β€” πŸ” Signature Verification Logic


models.py β€” πŸ“„ Webhook Payload (Example)


main.py β€” πŸš€ FastAPI App with Validation


requirements.txt


βœ… .env File or Environment Variables


▢️ Run Your Webhook Server

Last updated

Was this helpful?