LogoLogo
  • Welcome!
  • MOBILE SDK
    • iOS
      • SnapOdds Operator
        • Installation
        • Initialization
        • Snapping Games
        • Customization
        • API documentation
      • SnapOdds Sport Media
        • Installation
        • Initialization
        • Snapping Games and Presenting Odds
        • Customization
        • API documentation
    • Android
      • SnapOdds Operator
        • Installation
        • Initialization
        • Permissions
        • Snapping Games
        • Customization
        • API documentation
      • SnapOdds Sport Media
        • Installation
        • Initialization
        • Permissions
        • Snapping Games and Presenting Odds
        • Customization
        • API documentation
    • React Native
      • iOS Installation
      • Android Installation
      • SnapOdds Operator
        • Initialization
        • Snapping Games
        • Customization
      • SnapOdds Sport Media
        • Initialization
        • Snapping Games and Presenting Odds
        • Customization
  • Web SDK
    • JavaScript
      • SnapOdds Operator
        • Installation
        • Access Token Handling
        • Snapping Games
        • Customization
        • API documentation
      • SnapOdds Sport Media
        • Installation
        • Access Token Handling
        • Snapping Games and Presenting Odds
        • Customization
        • API documentation
      • Implementation Errors
  • Integration Guide
    • SnapOdds as Button
    • SnapOdds as Banner
Powered by GitBook
On this page
  • MissingAccessTokenProviderError
  • InvalidAccessTokenError
  • FetchAccessTokenError

Was this helpful?

Export as PDF
  1. Web SDK
  2. JavaScript

Implementation Errors

PreviousCustomizationNextSnapOdds as Button

Last updated 2 years ago

Was this helpful?

MissingAccessTokenProviderError

If the implementation of the accessTokenProvider method is missing this JavaScript error is thrown and shows up in the browsers developer console. No visual feedback is provided to the user as this is a typical implementation mistake. Please check the reference implementation available at .

InvalidAccessTokenError

In this case, please make sure that the the response from the accessTokenProvider returns a valid accessToken JSON object that contains the following properties:

{ 
  access_token: string,
  token_type: string, 
  refresh_token: string, 
  expires_in: number, 
  scope: string 
}

As the accessToken is retrieved after the SnapOdds WebComponent has been rendered, the user will be shown an Integration Error screen and the error shows up in the browsers developer console.

FetchAccessTokenError

If the promise returned by the accessTokenProvider method is rejected or can't be performed due to network problems then this error is thrown.

Make sure that your endpoint which provides the accessToken is reachable and check for any network errors in your browsers network tab.

As the accessToken is retrieved after the SnapOdds WebComponent has been rendered, the user will be shown an Integration Error screen and the error shows up in the browsers developer console.

Fetch AccessToken Example