โ๏ธGame Integration Setup Guide
document.getElementById('loginButton').addEventListener('click', function() {
const playerId = '12345'; // Replace with actual player ID
const customerId = '67890'; // Replace with actual customer ID from Ludo
const url = `https://{ludorewards_url}/api/v1/login?playerId=${playerId}&customerId=${customerId}`;
fetch(url)
.then(response => response.json())
.then(data => {
// Store sessionToken from data for further requests
const sessionToken = data.session_token;
// Handle successful login
})
.catch(error => {
// Handle errors
});
});Last updated