Bettor Account Management

Once your users link a sportsbook account, they'll need the ability to manually refresh, pause, remove and see the status of accounts they've linked.

Custom Bettor Account Management Functionality

To integrate the linked account management functionality into your existing user experience, you can use the SharpSports API to create the necessary functionality. Below is a guide to some of the suggested features.

Refreshing Accounts

Use the ๐Ÿ”„ refresh bettor and/or ๐Ÿ”„ refresh bettorAccount endpoints / methods to allow users to initiate a refresh themselves.

Pausing Accounts

Sometimes users want to pause syncing for a particular account. You can give users the ability to pause an account with the โธ๏ธ pause call.

Removing Accounts

You can remove an account by changing access to false on a specific bettorAccount using the โŒ remove access endpoint. When bettorAccount.access=false, you will no longer be able to refresh the account or get any associated information. When a user links the account again, the account will change to access = true and you will have access to refreshes and account data again.

Account Verified State

A bettorAccount can be in one of three verified states: verified, unverified, unverifiable. Everytime a refresh is run, the bettorAccount verified state might update.

These states are represented by the following fields:

bettorAccount.verified = true/false

bettorAccount.isUnverifiable = true/false

Use the ๐Ÿ”Ž bettorAccount detail endpoint to check these values.

Subscribe to the ๐Ÿ“ฑโœ… bettorAccount.verified and ๐Ÿ“ฑโš ๏ธbettorAccount.unverified webhooks to get notified of a change on bettorAccount.verified.

You can use this information, along with bettorAccount.latestRefreshResponse.detail to prompt the owner of the account to fix the issue.

Reverifying Accounts

An individual bettorAccount can be verified, unverified or unverifiable. For unverified and unverifiable accounts, you'll need to provide the user a path to reverifying their account.

curl -X POST -H "Authorization: Token <public_API_key>" https://api.sharpsports.io/v1/bettorAccounts/BACT_RHcNmovNT1pX5RZjrjwbQ/refresh?reverify=true

Unverified:

bettorAccount.verified = false

An account becomes unverified when a refresh is unsuccessful. This could be the result of a change in password, an error on the sportsbook site, or a prompt from the sportsbook to accept new terms of services or other actions. We will attempt to reverify unverified accounts periodically, but the user can trigger a reverification themselves with the ๐Ÿ”„ refresh bettorAccount with the reverify=true query param . These requests are treated the same as normal refresh requests, except they will attempt to connect to the sportsbook even if the account is unverified (but not unverifiable).

Unverifiable:

bettorAccount.isUnverifiable = true

Multiple reverification attempts will result in the bettorAccount becoming unverifiable. Unverifiable accounts can only be reverified by the user relinking their account in the UI. For these users, you'll need to direct the users to the UI using the ๐Ÿ”— Linking Accounts path.