Special Deal: Save 50% on Magic Link PRO Give hassle-free access to your users at half the price.

Developers

How Can I Get Notified Whenever A Magic Link Is Used?

Quick Answer

This is a Pro feature. Go to Magic Link -> Webhooks, add the address of a service that should be told about magic link activity, and choose which events to send. Your site then notifies that service as things happen.

Why This Helps

A webhook is how your site tells another tool that something happened, the moment it happens, without anyone checking a screen.

That turns magic link activity into something you can act on:

  • Connect to tools you already use. Zapier, Make, and n8n all accept webhooks. From there you can post to Slack, add a row to a spreadsheet, or update a CRM — without writing code.
  • Notice trouble early. A failed event arriving repeatedly is a sign of a problem worth investigating while it is happening, not next month.
  • Trigger your own follow-up. Someone used their link for the first time — send a welcome message, tag them, start onboarding.
  • Keep records outside WordPress. If your team lives in a helpdesk or a data warehouse, send the events there instead of asking people to log in and look.

The Audit Log answers "what happened?" when you go and look. Webhooks answer "tell me when it happens" without you looking.

Events You Can Send

Event When it fires
generated A magic link was created.
sent A magic link was emailed.
opened Someone opened a magic link.
used A magic link successfully logged someone in.
expired A magic link passed its expiry without being used.
revoked A magic link was cancelled.
failed An attempt to use a magic link did not succeed.
delivered The email carrying a magic link was accepted for delivery.
bounced The email carrying a magic link bounced.

Tick All events (wildcard) to receive everything, including any events added in future releases, or pick individual events. Choosing only what you use keeps the receiving end quiet and easier to reason about.

The delivered and bounced events are about the email, not the link. They are the ones to subscribe to if you are chasing "the member says they never got it" — a bounce tells you the message never arrived, which is a completely different problem from a link that went unused.

How To Add A Webhook

  1. Go to Magic Link -> Webhooks.
  2. Add a new endpoint.
  3. Paste the URL given to you by the receiving service. In Zapier or Make, create the "Webhook" trigger first and copy the address it shows you.
  4. Set a Secret — any long random string. See below for why.
  5. Choose the events to send.
  6. Save.
  7. Use the Test Fire button to send a sample straight away and confirm the other end receives it.

Test Fire is the fastest way to know your setup works. Use it before you rely on the connection.

Why The Secret Matters

Your webhook address is just a URL. Anyone who learns it could send messages to it pretending to be your site.

The secret prevents that. Every message is signed with it, so the receiving service can verify the message genuinely came from your site and was not altered in transit.

Practical advice:

  • Use a long random string, not a word.
  • Use a different secret for each endpoint.
  • Treat it like a password — anyone with it can impersonate your site to that endpoint.

If the service you are connecting to supports signature verification, turn it on and give it this secret. If it does not, the secret still costs you nothing.

If Messages Are Not Arriving

  • Use Test Fire first. It isolates the connection from everything else.
  • Check the URL is exactly right. A trailing character or an http that should be https is enough to break it.
  • Check the receiving service is listening. Zapier and Make webhooks sometimes need the scenario switched on before they will accept anything.
  • Check the event is subscribed. If you only subscribed to used, nothing happens when a link is merely generated.
  • Check whether your host blocks outbound requests. Some managed hosts restrict them. If Test Fire never arrives and everything else looks right, ask your host.

Delivery is retried if the receiving service is briefly unavailable, so a short outage on the other end does not necessarily lose the message.

Was this page helpful?

Previous
Magic Link REST API (PRO)