MagicBell Developer FAQ

Do I have to import my users?

No. When you create a notification through our API, we will create the users automatically if they don't already exist.

You can also send your users' data in the payload to the create notification endpoint to update the records we have on that user.

On the other hand, if you identify users by their email address and it changes in your system, you will have to update the email address through our API to ensure this user can still access their notifications.

Why do I see the "We can't seem to retrieve your notifications" message in the notification inbox?

There are three possible reasons:

  • MagicBell temporarily lost connection. Please check your internet connection.
  • You set the wrong API key. Please grab the correct key from your MagicBell Dashboard.
  • You enabled HMAC authentication but did not provide a userKey to the notification inbox, or the provided value is invalid. Please make sure you are using the correct API secret to generate this value.

What do I have to do to enable real-time for my notification inbox?

Nothing at all! Real-time capabilities are enabled by default for everyone, even if you are in the free plan.

What happens if a user clicks on our notifications? Can I control this behavior?

If the notification has an action url set, it will be opened in a new tab.

Create a notification with the action_url parameter set:

PAYLOAD
{
  "notification": {
    "title": "Welcome to MagicBell",
    "action_url": "https://developer.magicbell.com",
    "recipients": [
      {
        "email": "[email protected]"
      }
    ]
  }
}

Omit this parameter if you don't want this behavior.

You can also provide the onNotificationClick callback when you initialize your notification inbox. Learn more about this in our guide.

I want to separate notifications. What should I do?

Split your inbox using categories! Creating multiple tabs in your embeddable notification inbox is a great way to break up notifications for users.