The Bytebets platform provides a seamless process for integrating your website or any webpage to display all the games on any betting platform powered by the Bytebets unique betting solution powered by us.
This process of integration will only render the game specified wherever you specify on your html page. The advantage of this process is immense because our code exists on your platform as if it were native to your website and also does not in any way interfere with your code or the styling of your application.
To begin, make sure your application can comfortably load Javascript. Follow the guidelines below to seamlessly integrate with your platform.
Identify the Bytebets platform you need to integrate. For example if Bytebets powered platform is hosted on www.example.com. Add the following Javascript into your page head. Make sure you change the example.com to the domain you want to render.
<head>
<script src="https://www.example.com/api/bets-api.js"></script>
<script src="https://www.example.com/api/bets-api-def.js"></script>
</head>
Add the following to your body tag. Make sure you change the example.com to the domain you want to render games from. If you want to render a lotto game, the game_page parameter should bet set to lotto. The Game-ID should be set to the game-type of the game you want to display. The URL is the url of the api you want to display. Options can be winmax, softcashlotto, softcash, lottobeta etc. The last parameter which is the submit_url is the URL you want us to use to verify if the ticket values to. The submit_url must be a URL that implements a post request method. We will publish a post in the nearest future to explain what should be on the page.
The Code below is an example to display the winmax lotto game. The Example.com must be replaced with the domain of the platform you want to render games from.
<div id="container"></div>
<script>
BettingApiRender({
game_page: 'lotto',
game_id: 'winmax',
url: 'https://www.example.com/bet-game-api',//only change the example.com
submit_url:'http://www.yoururl.com', //replace this url with a url that accepts post request
parameters:[] //replace this url with a url that accepts post request.
}).render('#container');
</script>
The example code below displays the sports game. Don't forget to replace the example.com with the domain of the platform you want to render games from.
<div id="container"></div>
<script>
BettingApiRender({
game_page: 'sports', //type of games
game_id: '1433', //game_id of the game
url: 'https://www.example.com/bet-game-api',
submit_url:'http://www.yoururl.com' //replace this url with a url that accepts post request.
parameters:[] //An array of parameters that is important to you..
}).render('#container');
</script>
If you followed the guidelines as detailed above, you should have an unobstructed display of the intended game on your page. Your submit_url page must be a page accepting POST request. We will send the total value of the bet about to be placed by the bettor and whatever is in the parameters to your submit_url POST page. Your Request needs to validate the user and return the access_token in the Get Token API in the request body and whatever parameters is important to you. The response should be in the format below with a status code 200 indicating that the request is successful.
The Access Token is only valid for a single request. You have to generate an access token on each game submit
{'access_token': 'access_token_from_get_token_api', 'reference' => 'api_from_your_platform_game_reference', 'parameters' => ['parameter1' => 'parameter', 'array_of_parameters'}
An full working demo of a page rendered via the API can be found here https://www.bytebets.com.ng/api-test