Skip to main content

Start session

The CLI opens a DM to the HookMyApp test Instagram account. Send the prefilled message from your Instagram account. That account is now connected to this sandbox session.

Listen for messages locally

Keep the command running while you test. HookMyApp sends sandbox Instagram DMs to that route.

Send test message

The sandbox only sends to your connected Instagram account. There is no --to flag on sandbox send.

Env values

Write the sandbox env values to a .env file your server can load.
For an Instagram sandbox session:
  • WEBHOOK_HMAC_SECRET: the HMAC secret your server uses to verify X-HookMyApp-Signature-256 on incoming webhooks.
  • VERIFY_TOKEN: the value your server echoes back on the one-time verification GET when you run sandbox webhook set. Not the HMAC secret.
  • PORT: where your local server listens.
    Defaults to 3000.
  • INSTAGRAM_API_URL: the sandbox send URL.
  • INSTAGRAM_ACCESS_TOKEN: the sandbox channel token used to send DMs.
  • INSTAGRAM_ACCOUNT_ID: the ID of the test Instagram account.
The sandbox uses INSTAGRAM_ACCOUNT_ID.
A connected Instagram channel also emits INSTAGRAM_ACCOUNT_ID.

Manage session

  • Activate: hookmyapp sandbox start instagram opens a new sandbox session.
  • Connect: send the prefilled DM from the Instagram account you want to test with.
  • Lifetime: a session stays active until you stop it or start a new one.
  • Reactivate: run hookmyapp sandbox start instagram again and DM the sandbox account from the same user.
    You get fresh env values.
  • Stop early: hookmyapp sandbox stop tears down the session immediately.
  • Multiple sessions: use --username <@handle> with sandbox env, sandbox send, sandbox logs, and sandbox webhook.

Inspect messages

  • hookmyapp sandbox logs streams the session delivery log.
    Add --follow to tail it live and --verbose for full bodies.
  • hookmyapp sandbox webhook show prints where sandbox messages are delivered. hookmyapp sandbox webhook set overrides it and hookmyapp sandbox webhook clear reverts to the CLI-managed default.

Limitations

  • You can only message your connected Instagram account.
  • Connect your own Instagram account when you are ready for real customers.

Next steps