Overview

Generate Magic Link URL

Dashboard

API

Account Token Access

Dashboard

Webhook

Magic Link

Integrate your end users without any frontend code.

Overview

Our Magic Link allows you to deliver an in-browser Link experience without requiring any frontend code.

The Magic Link experience is sent to your end users via a secure URL.

Benefits:

  • Fast proof of concept of Merge without making frontend changes to embed Link into your app
  • Your users can authorize integrations without logging into your app, enabling custom user journeys
Magic Link Preview

A Magic Link instance can be generated in two ways:

  • From your Merge dashboard (basic)
  • Programmatically via API (advanced)
Merge Link demo in dashboard

You can initialize a Magic Link from the Merge Dashboard in four easy steps.

  1. Navigate to Linked Accounts in the left navigation
  2. Under Production Linked Accounts, click the button to Send Link via URL
  3. Enter your end user's information and the integration categories you want to make available to them
  4. Click Generate URL

That's it! You will be presented with a unique URL that you can send to your customer.

The URL will expire within 7 days

API

Merge also offers the ability to programmatically generate Magic Link URLs via API.

To do this, make a POST request to the /link-token endpoint.

In the body parameters of your POST request, set the should_create_magic_link_url parameter to true.

link_expiry_mins

In your POST request, we recommend setting the link_expiry_mins body parameter to the maximum of 10080 so that the Magic Link URL expires after 7 days.

If this parameter is not explicitly set, the generated Magic Link URL will expire 30 minutes after creation.


Accessing Account Tokens for Linked Accounts Created with Magic Link

Once your customer has successfully integrated their third-pary platform through Magic Link, you will need the new Linked Account's account token to make API requests to Merge on behalf of that Linked Account.

You are able to access the account tokens of Linked Accounts created through Magic Link in one of two ways:

  • From your Merge Dashboard (basic)
  • Programmatically via Merge Webhook (advanced)

Dashboard

You can access the account token of a Product Linked Account directly in the Merge Dashboard with the following steps.

  1. Navigate to Linked Accounts in the left navigation
  2. Under "Production Linked Accounts", select a Linked Account to go to its overview
  3. In the overview screen, the account token is in the bottom right

Account tokens are only visible to users with the Admin role.

Webhook

You can also receive the account token of a new Production Linked Account once the initial sync has completed by setting up a Merge Webhook.

Merge's first sync webhook will notify you in real time when a Production Linked Account has completed its initial sync.

This notification will be in the form of an inbound POST request to your API, containing the new Linked Account's account token in the payload.

First Sync Webhook Payload Example

JSON
{
"hook": {
id: "e8affe31-8ae0-4b37-8c50-d86303094dc4",
event: "LinkedAccount.synced_initial",
target: "https://webhook.site/105606a8-cfa3-4415-bae0-954e25137f00",
},
"linked_account": {
id: "4ac10f37-c656-4e9a-89a1-1b04f9e9a343",
integration: "Greenhouse",
integration_slug: "greenhouse",
category: "ats",
end_user_origin_id: "12345678910",
end_user_organization_name: "Example Organization",
end_user_email_address: "jane@gmail.com",
status: "COMPLETE",
webhook_listener_url: "https://api.merge.dev/api/integrations/webhook-listener/abcd1234defg5678",
},
"data": {
account_token: "PRODUCTION_LINKED_ACCOUNT_TOKEN",
integration_name: "Greenhouse",
integration_id: "greenhouse",
synced_models: ["ats.Candidate"],
},
}