Welcome to the technical requirements for integrating the Sportradar Virtual Stadium widgets into your website.
Table of Contents
In order to initialize the widget, there are requirements
1. JWT Validation
Validation ensures that the JWT you create originates from your system. Once validated, you will pass the JWT to the widget as props.
Before sending the token for validation, it needs to be signed and contain the correct payload:
const payload = {
iss: // client,
sub: // Unique userId
env: // 'dev' or 'prod' will make token validation to validate against correct signing key
scope: 'vs',
// VS API requirements
apiKey: //Api key that you will receive from our client setup
userId: //Unique user id
displayName: // Display name that will be displayed in the chat
userType: // ['Normal', 'vip']
};
For a detailed explanation, see Signed token - JWT.
2. Adapter
An adapter is a software component developed by the Sportradar engineering team that enables communication between the Sportradar Bet Widgets and the client’s API or front end. The adapter retrieves information from the client and displays it within the widget, ensuring a seamless integration between the two systems. The Sportradar engineering team will develop an adapter based on the client's API to make API calls and display information within the widget. Before the adapter can be developed, the client's API must be confirmed and aligned with the Sportradar engineering team. Once this is completed, the development of the adapter can commence.
For more information see Data Adapter
3. Widget Integration
The widget integration requires the inclusion of two SIR methods in your website:
Method | Description |
---|---|
registerAdapter | Used to configure the adapter that retrieves and displays the information from the client's API or front end. |
addWidget | Used to add the widget to your website |
The documentation at the following link provides detailed information on how to integrate and customize the Virtual Stadium widgets using the available parameters.
Virtual Stadium Chat, see Chat