Skip to main content

App redirects

If your team has more than one app on the platform, you can send the user from one of your apps to another — for example, from a "play our other game" button.

The redirect API is currently available in the HTML5 SDK only.

Apps run inside an iframe and cannot navigate the top-level page themselves. Instead, the SDK asks the platform to perform the navigation. The target app is identified by its slug — the <slug> part of its jest.com/g/<slug> URL.

Same-team restriction

Redirects are limited to apps owned by the same team as the calling app. The platform verifies ownership before navigating; attempting to redirect to another team's app is rejected and no navigation happens.

On success, the platform navigates to the target app. By default the user is shown the usual exit confirmation dialog when leaving your app; you can opt to skip it.

You can also pass an optional entry payload, which is delivered to the target app and available there through the entry payload API. This is useful for attribution or for carrying context across the redirect.

Redirect to another app

JestSDK.redirectToTeamGame(options)

const result = await JestSDK.redirectToTeamGame({
gameSlug: "trivia-battle",
});

if (result.result === "error") {
console.error("Redirect failed:", result.error);
}

On success, the promise resolves with { result: "success" }. Pass skipGameExitConfirm: true and/or entryPayload:

await JestSDK.redirectToTeamGame({
gameSlug: "trivia-battle",
entryPayload: { source: "cross_promo_button" },
skipGameExitConfirm: true,
});
redirectToTeamGame(options: {
gameSlug: string;
entryPayload?: Record<string, unknown>;
skipGameExitConfirm?: boolean;
}): Promise<
| { result: "success" }
| { result: "error"; error: "game_not_found" | "different_team" | "internal_error" }
>;

Options:

NameTypeDescription
gameSlugstringThe slug of the target app. Must belong to the same team as the calling app.
entryPayloadRecord<string, unknown>Optional. Metadata delivered to the target app via getEntryPayload().
skipGameExitConfirmbooleanOptional. When true, skips the exit confirmation dialog shown when leaving the current app. Defaults to false.

Error results:

ErrorDescription
game_not_foundNo app with the given slug exists.
different_teamThe target app is owned by a different team; the redirect was refused.
internal_errorA transient platform error occurred. Safe to retry.

The method throws if the SDK is not initialized or the arguments are invalid.