🔄 Refreshing Accounts
The Basics
A Refresh
refers to the act of pulling updated 📱 BettorAccount and 💰 BetSlip data from an authorized, linked account. Refreshes can be initiated through an API call initiated by a user, a pre-set Refresh Cadence set in the SharpSports dashboard, or by Sharpsports itself.
The result of a Refresh
is a 🔄 Refresh Response, which is sent via webhook at the conclusion of a refresh, and can be fetched via the API.
Refresh Type | Notes |
---|---|
Manual | This is a refresh initiated via the API either via the 🔄 refresh bettor or 🔄 refresh bettorAccount calls. |
Cadence | This is a refresh initiated by SharpSports on a cadence specified in the SharpSports dashboard settings. |
Grade | If you've turned autograde on in the SharpSports dashboard, SharpSports will automatically grade pending 💰 BetSlips and send the result via a refreshResponse webhook. |
System | SharpSports will periodically execute refreshes on linked accounts to make sure the linked account data stays up to date. |
For books that are marked as SDK Required, manual and grade refreshes are the only type that can be triggered. For manual refreshes, only the SDK Refresh method and parameters are supported.
Best Practices
Manual Refreshes
To create the optimal user experience, SharpSports recommends initiating a manual refresh when a user logs into their account or opens the app. SDK refreshes can only be initiated in the client, and only when the bettor is authenticated.
It's required that you notify users when a refresh on their account is being initiated.
Cadence Refreshes
For books where cadence refreshes are available, SharpSports recommends a once, or twice a day cadence.
Excessive refreshes on an account may result in overage charges and can create suboptimal bettor experience.
Hosting a Refresh Button
It can be helpful to offer bettors the ability to trigger a refresh on their own, if they want to update the data on their account. We recommend using the manual refresh calls and methods to add this ability to the UI.
Updated about 1 year ago