None of these methods require you to join a game.

Login Methods

There are 4 ways to become authorized. These are all asynchronous and should be awaited. They also all return the same thing, which is either an error string or bot.account.

[async] bot.createAccount

Creates an account with an email and password.

await bot.createAccount('email@example.com', 'MyEpicPassword123!!');

[async] bot.login

Logs you into an account using an email and password. If you do not call this, joining a game will create and use an anonymous account.

await bot.login('email@example.com', 'MyEpicPassword123!!');

[async] bot.loginWithRefreshToken

Logs you into an account using a Firebase refresh token.

This is currently a method that does not violate Google’s ToS (automation). It also works with Facebook, although no one uses Facebook. It could also be used for email/password, although it is technically less stable.

To obtain a refresh token from Shell, run the following console script while logged into your account:

const notLoggedIn = () => console.error('You do not appear to be logged in.');

const request = indexedDB.open('firebaseLocalStorageDb');

request.onsuccess = function(event) {
    const db = event.target.result;
    const transaction = db.transaction(['firebaseLocalStorage'], 'readonly');
    const store = transaction.objectStore('firebaseLocalStorage');

    const getAllKeysRequest = store.getAllKeys();

    getAllKeysRequest.onsuccess = function() {
        const getRequest = store.get(getAllKeysRequest.result[0]);

        getRequest.onsuccess = function() {
            window.copy = () => {
                document.querySelector('#cp').remove();
                navigator.clipboard.writeText(getRequest.result.value.stsTokenManager.refreshToken)
            };
            document.body.insertAdjacentHTML('beforeend', `<div style="position:absolute;top:0;left:0;width: 100%;height:100%;background:black;cursor:pointer;display:flex;justify-content:center;align-items:center;z-index:999999;" onclick="copy()" id="cp"><h1 style="color:white;font-family:'Nunito';font-weight:bold;">click me to copy token!</h1></div>`);
        };

        getRequest.onerror = () => notLoggedIn();
    };

    getAllKeysRequest.onerror = () => notLoggedIn();
};

request.onerror = () => notLoggedIn();

This will create a black screen with a white text that says “click me to copy token!”. Clicking it will copy the refresh token to your clipboard. Then, put it into loginWithRefreshToken:

await bot.loginWithRefreshToken('some-VeRy-L0ng-rAndomTexT-heRe');

[async] bot.loginAnonymously

Logs you into a guest/anonymous account. This is the default behavior if you do not call either of the above authorization functions and attempt to do something like joining a game.

await bot.loginAnonymously();

bot.account

This is an object that stores account information.

  • bot.account.id - the id of the account
  • bot.account.firebaseId - the firebase id (for auth)
  • bot.account.sessionId - the session id (for auth)
  • bot.account.session - the session (for auth)
  • bot.account.email - the raw email of the account
  • bot.account.password - the raw password (plaintext, be careful) of the account
  • bot.account.ownedItemIds - the owned items’ IDs
  • bot.account.vip - if the account is vip status
  • bot.account.accountAge - the age of the account in milliseconds
  • bot.account.emailVerified - if the account’s email is verified
  • bot.account.eggBalance - the egg balance
  • bot.account.cw - cw status
    • bot.account.cw.atLimit - if the account is at the limit for the day
    • bot.account.cw.limit - the number of times the account has played cw that day
    • bot.account.cw.secondsUntilPlay - the number of seconds until the account can play again
    • bot.account.cw.canPlayAgain - the timestamp the account can play again
  • bot.account.stats - user stats
    • bot.account.stats.montly - monthly stats
    • bot.account.stats.lifetime - lifetime stats
    • structure for both: click
    • requires STATS intent

Chikn Winner

These methods allow you to play Chikn Winner.

[async] bot.checkChiknWinner

Allows you to check the status of the Chikn Winner minigame for the account. It returns something like this:

await bot.checkChiknWinner() /* -> {
    atLimit: false,
    limit: 1,
    secondsUntilPlay: 240,
    canPlayAgain: 1742002470386
} */

More information is in the explanation for bot.account.cw below.

[async] bot.playChiknWinner

Allows you to play the Chikn Winner minigame. It will either return what you pulled, which either is eggs:

await bot.playChiknWinner() /* -> {
    eggsGiven: 100,
    itemIds: [],
    rewardTier: 2
} */

or an item:

await bot.playChiknWinner() /* -> {
    eggsGiven: 0,
    itemIds: [3066],
    rewardTier: 1
} */

It may also return a string, which is one of these errors:

  • hit_daily_limit - the bot has hit the daily limit, run bot.resetChiknWinner() to reset the limit for 200 eggs
  • on_cooldown - chikn winner is on cooldown, see bot.account.cw.secondsUntilPlay for the seconds until you can play again
  • session_expired - the bot’s session expired, usually because the bot’s account was deleted due to bot detection
  • unknown_error - an unknown error returned by shell - create an issue on github with the content in the console

[async] bot.resetChiknWinner

Allows you to reset Chikn Winner for 200 eggs if you have hit the daily limit.

If it successfully resets, it will return the Chikn Winner status (from bot.checkChiknWinner()).

It may also fail, returning one of these errors:

  • not_at_limit - the bot is not at the limit for the day, and you should play normally
  • not_enough_eggs - the bot does not have enough eggs to reset
  • unknown_error - an unknown error returned by shell - create an issue on github with the content in the console