๐Ÿ–ฅ๏ธ web browser extension

Overview

Certain sportsbooks can only be linked on web via the SharpSports browser extension. Read the sdk support section for more details.

The extension download experience will be managed via the SharpSports UI. By following the instructions below, your customers will be prompted to download the extension where applicable.

1. Generate the Extension Auth Token

First, generate an extension authentication token in your backend. The authentication token can be re-used and is
the same as those generated for the mobile packages if you are integrating on multiple platforms.

Use the auth tokens endpoint.

2. Add the Extension Script Tag

Add the Sharpsports Extension Script to the root index.html of your page to ensure that it is loaded properly.

<script src='https://d1vhnbpkpweicq.cloudfront.net/extension-cdn.js'
internalId = "internal-id"
publicKey = "public-api-key"
extensionAuthToken = "extension-auth-token"></script>

3. Add Auth Token to Post Context Call

Utilize the ๐Ÿ”„ betSync Context endpoint with the extensionAuthToken generated in the previous step.

4. Include Auth Token in Relevant Refresh Calls

Add the auth token, and the version of the SharpSports extension that is downloaded by the bettor (extensionVersion) to the ๐Ÿ”„ refresh bettor and/or ๐Ÿ”„ refresh bettorAccount calls.

The version of the SharpSports extension downloaded in the bettor's browser can be accessed at:

sessionStorage.getItem("sharpSportsExtensionVersion")

Note: even if there is no extension version, include this value.

In the case a bettor has an out of date extension, that information will be included in the request response:

extensionUpdateRequired: ['BACT_ID']

You will also recieve an extensionDownloadUrl where the user can download or update the extension if you want to prompt them to do so.

5. Enable the Native SDK Toggle

In the SharpSports Dashboard, enable the Native SDK toggle, once you are ready for users to begin being prompted to take the correct path when they encounter an sdkRequired=true book.