Deeplink Support

lucraClient.sendMessage.deepLinkResponse(...)

Responds to a deepLink request message with a transformed URL. Used when Lucra requests a URL that should be opened in your application, which then navigates back to Lucra at the specified location. For matchup invitation links, prefer using matchupDeepLinkHandler instead.

Example payload:

lucraClient.sendMessage.deepLinkResponse({
  url: "https://yourapp.com?redirect=https://tenant.lucrasports.com/app/matchups/123"
});

Configuring Matchup Invite URL Generation

When users want to share or invite others to a matchup, you need to configure how invite URLs are generated. Use the matchupDeepLinkHandler:

const lucraClient = new LucraClient({
  tenantId: "your-tenant-id",
  env: "production",
  onMessage: {
    /* ... */
  },
});

// Configure the transformer to generate invite URLs
lucraClient.matchupDeepLinkHandler = (matchupId) => {
  return Promise.resolve(`${window.location.origin}?matchupId=${matchupId}`);
};

How it works:

  1. Lucra requests an invite URL - When a user shares a matchup, Lucra calls your handler with the matchupId

  2. Your handler generates a shareable URL - Create a URL that can be shared via social media, messaging, etc.

  3. Receiver opens the URL - When someone clicks the link, it opens your application

  4. Your app detects the matchupId - On launch, check URL parameters and navigate to the matchup:

Migration from deprecated deepLinkHandler for matchup invitations

Key Differences:

Old (deepLinkHandler)

New (matchupDeepLinkHandler)

Received full Lucra URL

Receives clean matchupId string

Required manual URL parsing

No parsing needed

Manual deepLinkResponse call

Returns URL directly (auto-responds)

Generic for all deep links

Specific to matchup invites

Migration Example:

Last updated