Skip to content

seven.io: register the webhook automatically on "Test connection" #17

Open

Description

@Schero94

Today the owner has to add the account's webhook URL in the seven.io dashboard by hand and must pick the request method JSON; seven.io's default (form POST) cannot be read by MessageGate (see #13, docs/audits/2026-11-20-provider-apis.md finding 1).

Proposal: on "Test connection" for a seven.io account (and when server.url is set), register the hook through the official API, like Telegram's setWebhook:

POST https://gateway.seven.io/api/hooks
target_url=https://cms.example.test/api/magic-messagegate/webhooks/seven/<path>
event_type=dlr            (and a second hook for sms_mo)
request_method=JSON
  • Look up existing hooks first (GET /api/hooks) and do not create duplicates for the same target_url.
  • Never delete or change hooks MessageGate did not create.
  • Show the result in the account card ("Webhook registered at seven.io").
  • Contract: tests/contract/specs/seven.json already pins POST /hooks; the live suite (tests/live/seven.live.test.js) already creates/deletes hooks and can verify it.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions