apiURL
string
required

This is the address of the Legitimuz API.

Example: https://api.legitimuz.com

token
string
required

The token is your integration token. You can generate an integration token on the integrations page under the installation tab in the Legitimuz Dashboard.

action
string

The action you want to perform.

The available actions:

  • signin: login action
  • signup: registration action
  • deposit: deposit action
  • withdraw: withdrawal action
  • bet: Bet action
  • bet_profit: Bet profit action
  • bet_loss: Bet loss action
  • check: must be send every 30 minutes

Examples:

<script src="https://cdn.legitimuz.com/js/sdk/antifraude.js"></script>
<script type="text/javascript">
  const sdkInstance = LegitimuzAntiFraude({
    /* options */
    action: 'signin',
  });

  // Mount the SDK
  sdkInstance.mount();
</script>
enableRequestGeolocation
boolean
default:"false"

The enableRequestGeolocation option allows you to enable or disable the request for the user’s geolocation.

Highly recommended to stay true.

Examples:

<script src="https://cdn.legitimuz.com/js/sdk/antifraude.js"></script>
<script type="text/javascript">
  const sdkInstance = LegitimuzAntiFraude({
    /* options */
    action: 'signin',
    enableRequestGeolocation: true,
  });

  // Mount the SDK
  sdkInstance.mount();
</script>
eventHandler
function: (event: object): void

The eventHandler option allows you to receive events from the SDK.

Examples:

<script src="https://cdn.legitimuz.com/js/sdk/antifraude.js"></script>
<script type="text/javascript">
  const sdkInstance = LegitimuzAntiFraude({
    /* options */
    action: 'signin',
    enableRequestGeolocation: true,
    eventHandler: event => {
      console.log(event); // { eventId: string; name: string, data: object }
    }
  });

  // Mount the SDK
  sdkInstance.mount();
</script>