Skip to content

canvas webhook listen

canvas webhook listen

Start webhook listener server

Synopsis

Start a webhook listener server to receive Canvas events.

The server listens on the specified address and processes incoming webhook events. It supports two verification methods:

  1. JWT verification (Canvas Data Services): Use --canvas-data-services or --jwks-url to verify JWT-signed payloads from Canvas Data Services. JWKs are fetched from Canvas and cached.

  2. HMAC verification (custom integrations): Use --secret to verify HMAC-SHA256 signatures for custom webhooks.

Endpoints: POST /webhook - Receive webhook events GET /health - Health check endpoint

Examples:

# Canvas Data Services mode (recommended for production)
canvas webhook listen --canvas-data-services --log

# Custom JWK endpoint
canvas webhook listen --jwks-url https://your-jwks.com/jwks

# HMAC signature verification
canvas webhook listen --secret my-secret --log

# Both modes (fallback)
canvas webhook listen --canvas-data-services --secret backup-secret

# Listen for specific events
canvas webhook listen --events grade_change,submission_created
canvas webhook listen [flags]

Options

      --addr string            Server address to listen on (default ":8080")
      --canvas-data-services   Use Canvas Data Services JWK URL for JWT verification
      --events strings         Event types to handle (comma-separated)
  -h, --help                   help for listen
      --jwks-url string        JWK Set URL for JWT verification
      --log                    Enable request logging
      --secret string          Webhook secret for HMAC verification

Options inherited from parent commands

      --as-user int       Masquerade as another user (admin feature, requires permission)
      --columns strings   Select specific columns to display (comma-separated)
      --config string     config file (default is $HOME/.canvas-cli/config.yaml)
      --dry-run           Print curl commands instead of executing requests
      --filter string     Filter results by text (case-insensitive substring match)
      --instance string   Canvas instance URL (overrides config)
      --limit int         Limit number of results for list operations (0 = unlimited)
      --no-cache          Disable caching of API responses
  -o, --output string     Output format: table, json, yaml, csv (default "table")
      --show-token        Show actual token in dry-run output (default: redacted)
      --sort string       Sort results by field (prefix with - for descending, e.g., -name)
  -v, --verbose           Enable verbose output

SEE ALSO

Auto generated by spf13/cobra on 25-Jan-2026