Protection
Games get copied. A site lifts your build, hosts it themselves, and keeps the ad revenue — while you carry the cost of having made it.
Y8 maintains a list of sites known for doing this, and the SDK lets your game ask whether it is currently running on one. A game that checks, and says so when the answer is yes, is worth less to those sites than one that does not — which is what makes hosting your game properly the easier option.
Checking costs one call at startup.
Authentication
Protection checks do not require the player to be authenticated.
Check if the Current Domain is Blacklisted
Determine whether the current domain is blacklisted.
y8Sdk.isBlacklisted()
.then((blacklisted) => {
if (blacklisted) {
// Show a message directing the player
// to the official game page.
}
})
.catch((error) => {
console.error(error.message);
});
The list is fetched on the first check and reused for the rest of the session, so calling this more than once costs nothing after the first.
The returned value is:
true— The current domain is blacklisted.false— The current domain is not blacklisted.
JsResponse<bool> response =
await Y8.Instance.IsBlacklistedAsync();
if (response.IsSuccess && response.Data)
{
// Show a message directing the player
// to the official game page.
}
The blacklist is cached by the SDK after the first request.
checkBlacklist → On clicked
→ Call checkBlacklist
On function checkBlacklist
→ checkBlacklist()

If the current domain is blacklisted, the C3 integration triggers the WebsiteBlacklisted function.
On function WebsiteBlacklisted
→ Show a message directing the player
to the official game page.

If the domain is not blacklisted, WebsiteBlacklisted is not triggered.
Y8.checkBlacklist(function(blacklisted:Bool) {
trace("Blacklisted: " + blacklisted);
if (blacklisted) {
trace("Website is blacklisted");
// Show a message directing the player
// to the official game page.
}
});
The callback receives a Bool:
true— The current domain is blacklisted.false— The current domain is not blacklisted.
Recommended Handling
Check the blacklist status during game startup.
If the current domain is blacklisted:
Blacklisted
↓
Inform the player
↓
Direct the player to the official game page