👥 Referral Zoop Airdrop + script for auto task and auto spin

Chococakelover

Established
Register here:
ZOOP App

Script installation
First you must have You do not have permission to view the full content of this post. Log in or register now., Download and Install tas after nyan, Create a folder called Zoop or anything you want but name them after the app itself para di na kayu malito oki?
After creating, open the folder Zoop and then gawa kayu new file called zoop.js tas ilalagay nyupo itong code sa ibaba


Code:
const fs = require('fs');
const axios = require('axios');
const { HttpsProxyAgent } = require('https-proxy-agent');
const chalk = require('chalk').default;

const CONFIG = {
  authEndpoint: "https://tgapi.zoop.com/api/oauth/telegram",
  spinEndpoint: "https://tgapi.zoop.com/api/users/spin",
  taskEndpoint: "https://tgapi.zoop.com/api/tasks",
  verifyTaskEndpoint: "https://tgapi.zoop.com/api/tasks/verified",
  queryPath: "./token.txt",
  proxyPath: "./proxies.txt",
  retryDelay: 5000,
  spinDelayMin: 2000,
  spinDelayMax: 5000,
  checkInterval: 3600000,
  dailyCheckInterval: 1800000,
  spinCheckInterval: 300000,
  logFile: "./bot_log.txt",
  proxyTimeout: 10000, // 10 second timeout for proxy connections
  maxProxyAttempts: 2, // Maximum attempts with proxy before falling back
  headers: {
    "accept": "*/*",
    "accept-language": "en-US,en;q=0.9",
    "content-type": "application/json",
    "sec-ch-ua": "\"Chromium\";v=\"133\", \"Microsoft Edge WebView2\";v=\"133\", \"Not(A:Brand\";v=\"99\", \"Microsoft Edge\";v=\"133\"",
    "sec-ch-ua-mobile": "?0",
    "sec-ch-ua-platform": "\"Windows\"",
    "sec-fetch-dest": "empty",
    "sec-fetch-mode": "cors",
    "sec-fetch-site": "same-site",
    "Referer": "https://tgapp.zoop.com/",
    "Referrer-Policy": "strict-origin-when-cross-origin"
  }
};

const BANNER = chalk.cyan(`
=====================================
  ${chalk.bold.yellow('Zoop Auto Bot | Pesh')}
=====================================
`);

// Store account information for summary
const accountSummary = [];
// Store bad proxies to avoid using them again
const badProxies = new Set();

function logMessage(message, type = 'info', account = '') {
  const timestamp = new Date().toISOString();
  const accountPrefix = account ? `[Account ${account}] ` : '';
  const logEntry = `[${timestamp}] ${accountPrefix}${message}`;
  fs.appendFileSync(CONFIG.logFile, logEntry + "\n");
  
  let styledOutput;
  switch(type) {
    case 'success':
      styledOutput = `${chalk.gray(`[${timestamp}]`)} ${account ? chalk.blue(`[Account ${account}]`) : ''} ${chalk.green('SUCCESS')} ${message}`;
      break;
    case 'error':
      styledOutput = `${chalk.gray(`[${timestamp}]`)} ${account ? chalk.blue(`[Account ${account}]`) : ''} ${chalk.red('ERROR')} ${message}`;
      break;
    case 'warning':
      styledOutput = `${chalk.gray(`[${timestamp}]`)} ${account ? chalk.blue(`[Account ${account}]`) : ''} ${chalk.yellow('WARNING')} ${message}`;
      break;
    case 'spin':
      styledOutput = `${chalk.gray(`[${timestamp}]`)} ${account ? chalk.blue(`[Account ${account}]`) : ''} ${chalk.magenta('SPIN')} ${message}`;
      break;
    case 'daily':
      styledOutput = `${chalk.gray(`[${timestamp}]`)} ${account ? chalk.blue(`[Account ${account}]`) : ''} ${chalk.blue('DAILY')} ${message}`;
      break;
    case 'task':
      styledOutput = `${chalk.gray(`[${timestamp}]`)} ${account ? chalk.blue(`[Account ${account}]`) : ''} ${chalk.cyan('TASK')} ${message}`;
      break;
    case 'proxy':
      styledOutput = `${chalk.gray(`[${timestamp}]`)} ${account ? chalk.blue(`[Account ${account}]`) : ''} ${chalk.magenta('PROXY')} ${message}`;
      break;
    default:
      styledOutput = `${chalk.gray(`[${timestamp}]`)} ${account ? chalk.blue(`[Account ${account}]`) : ''} ${chalk.blue('→')} ${message}`;
  }
  console.log(styledOutput);
}

function getRandomDelay(min, max) {
  return Math.floor(Math.random() * (max - min + 1) + min);
}

function getQueryIds() {
  try {
    const queryIds = fs.readFileSync(CONFIG.queryPath, 'utf8')
      .split('\n')
      .map(line => line.trim())
      .filter(line => line.length > 0);
    
    if (queryIds.length === 0) {
      throw new Error("No valid query IDs found in token.txt");
    }
    
    return queryIds;
  } catch (error) {
    logMessage(`Error reading query file: ${error.message}`, 'error');
    throw new Error("Failed to read query file. Make sure token.txt exists with valid query IDs.");
  }
}

function parseUserIdFromQuery(queryId) {
  try {
    const params = new URLSearchParams(queryId);
    const userData = params.get('user');
    if (!userData) throw new Error("No user data found in query ID");
    const user = JSON.parse(decodeURIComponent(userData));
    return user.id;
  } catch (error) {
    logMessage(`Error parsing userId from query: ${error.message}`, 'error');
    throw error;
  }
}

function loadProxies() {
  try {
    if (!fs.existsSync(CONFIG.proxyPath)) {
      logMessage("No proxies.txt found. Running without proxies.", 'warning');
      return [];
    }
    const proxies = fs.readFileSync(CONFIG.proxyPath, 'utf8')
      .split('\n')
      .map(line => line.trim())
      .filter(line => line);
    
    if (proxies.length === 0) {
      logMessage("proxies.txt is empty. Running without proxies.", 'warning');
      return [];
    }
    
    return proxies;
  } catch (error) {
    logMessage(`Error loading proxies: ${error.message}`, 'error');
    return [];
  }
}

function parseProxy(proxyString) {
  if (badProxies.has(proxyString)) {
    return null;
  }

  let protocol = 'http';
  let host, port, username, password;

  if (proxyString.startsWith('http://') || proxyString.startsWith('socks4://') || proxyString.startsWith('socks5://')) {
    const [proto, rest] = proxyString.split('://');
    protocol = proto;
    const parts = rest.split(':');
    if (parts.length >= 2) {
      host = parts[0];
      port = parts[1];
      if (parts.length === 4) {
        username = parts[2];
        password = parts[3];
      }
    }
  } else {
    const parts = proxyString.split(':');
    if (parts.length >= 2) {
      host = parts[0];
      port = parts[1];
      if (parts.length === 4) {
        username = parts[2];
        password = parts[3];
      }
    }
  }

  if (!host || !port) {
    return null;
  }

  const proxyUrl = username && password 
    ? `${protocol}://${username}:${password}@${host}:${port}`
    : `${protocol}://${host}:${port}`;
  
  return { 
    originalString: proxyString,
    host, 
    port, 
    agent: new HttpsProxyAgent(proxyUrl) 
  };
}

function updateAccountSummary(accountIndex, username, points, spins) {
  // Find existing account or create new entry
  const existingIndex = accountSummary.findIndex(acc => acc.index === accountIndex);
  
  if (existingIndex >= 0) {
    accountSummary[existingIndex] = { index: accountIndex, username, points, spins };
  } else {
    accountSummary.push({ index: accountIndex, username, points, spins });
  }
}

function displayAccountsSummary() {
  console.log("\n" + chalk.yellow("===== ACCOUNTS SUMMARY ====="));
  console.log(chalk.cyan("Index | Username | Points | Spins"));
  console.log(chalk.gray("----------------------------"));
  
  // Sort accounts by index
  accountSummary.sort((a, b) => a.index - b.index);
  
  accountSummary.forEach(account => {
    console.log(
      chalk.blue(`${account.index.toString().padEnd(5)} | `) +
      chalk.green(`${account.username.padEnd(8)} | `) +
      chalk.yellow(`${account.points.toString().padEnd(6)} | `) +
      chalk.magenta(account.spins)
    );
  });
  console.log(chalk.yellow("=============================\n"));
}

async function makeRequest(method, url, options, proxyAgent, accountIndex, fallbackToDirectOnError = true) {
  const config = {
    ...options,
    method,
    url,
    timeout: CONFIG.proxyTimeout
  };
  
  // First try with proxy if provided
  if (proxyAgent) {
    try {
      config.httpsAgent = proxyAgent;
      const response = await axios(config);
      return response;
    } catch (error) {
      if (error.code === 'ETIMEDOUT' || error.code === 'ECONNREFUSED' || error.code === 'ECONNRESET') {
        logMessage(`Proxy connection failed: ${error.message}`, 'proxy', accountIndex);
        
        if (options.proxyInfo) {
          badProxies.add(options.proxyInfo.originalString);
          logMessage(`Added ${options.proxyInfo.host}:${options.proxyInfo.port} to bad proxies list`, 'proxy', accountIndex);
        }
        
        if (fallbackToDirectOnError) {
          logMessage(`Falling back to direct connection`, 'proxy', accountIndex);
          // Retry without proxy
          delete config.httpsAgent;
          const directResponse = await axios(config);
          return directResponse;
        } else {
          throw error;
        }
      } else {
        throw error;
      }
    }
  } else {
    // No proxy, make direct request
    const response = await axios(config);
    return response;
  }
}

async function getAccessTokenAndInfo(queryId, proxyAgent, accountIndex, proxyInfo = null) {
  try {
    const payload = { initData: queryId };
    const options = {
      headers: CONFIG.headers,
      data: payload,
      proxyInfo
    };
    
    const response = await makeRequest('post', CONFIG.authEndpoint, options, proxyAgent, accountIndex);
    const token = response.data.data.access_token;
    const info = response.data.data.information;
    logMessage(`Access token retrieved successfully`, 'success', accountIndex);
    logMessage(`User: ${chalk.cyan(info.username)} | Points: ${chalk.yellow(info.point)} | Spins: ${chalk.magenta(info.spin)}`, 'info', accountIndex);
    
    // Update account summary
    updateAccountSummary(accountIndex, info.username, info.point, info.spin);
    
    return { token, info };
  } catch (error) {
    logMessage(`Error getting access token: ${error.response?.data?.message || error.message}`, 'error', accountIndex);
    throw error;
  }
}

async function checkDailyInfo(token, userId, proxyAgent, accountIndex, proxyInfo = null) {
  try {
    const headers = { ...CONFIG.headers, "authorization": `Bearer ${token}` };
    const taskEndpoint = `${CONFIG.taskEndpoint}/${userId}`;
    const options = {
      headers,
      proxyInfo
    };
    
    const response = await makeRequest('get', taskEndpoint, options, proxyAgent, accountIndex);
    
    const taskData = response.data.data;
    
    const dailyClaimInfo = {
      dailyClaimed: taskData.claimed,
      dayClaim: taskData.dayClaim,
      dailyIndex: taskData.dailyIndex
    };
    
    logMessage(`Daily: ${dailyClaimInfo.dailyClaimed ? chalk.green('Claimed') : chalk.yellow('Not Claimed')} | Day: ${dailyClaimInfo.dailyIndex}`, 'daily', accountIndex);
    
    return dailyClaimInfo;
  } catch (error) {
    logMessage(`Error checking daily info: ${error.response?.data?.message || error.message}`, 'error', accountIndex);
    throw error;
  }
}

async function claimDailyTask(token, userId, proxyAgent, dailyIndex, accountIndex, proxyInfo = null) {
  try {
    const headers = { ...CONFIG.headers, "authorization": `Bearer ${token}` };
    const dailyTaskEndpoint = `${CONFIG.taskEndpoint}/rewardDaily/${userId}`;
    const payload = { index: dailyIndex };
    const options = {
      headers,
      data: payload,
      proxyInfo
    };
    
    logMessage(`Claiming daily task for day ${dailyIndex}...`, 'daily', accountIndex);
    
    const response = await makeRequest('post', dailyTaskEndpoint, options, proxyAgent, accountIndex);
    
    logMessage(`Daily task claimed successfully!`, 'success', accountIndex);
    
    return response.data;
  } catch (error) {
    logMessage(`Error claiming daily task: ${error.response?.data?.message || error.message}`, 'error', accountIndex);
    throw error;
  }
}

async function verifyTwitterFollowTask(token, userId, proxyAgent, accountIndex, proxyInfo = null) {
  try {
    const headers = { ...CONFIG.headers, "authorization": `Bearer ${token}` };
    const verifyEndpoint = `${CONFIG.verifyTaskEndpoint}/${userId}`;
    const payload = {
      point: 3000,
      spin: 2,
      type: "FOLLOW_ACCOUNT_X"
    };
    const options = {
      headers,
      data: payload,
      proxyInfo
    };
    
    logMessage(`Verifying Twitter follow task...`, 'task', accountIndex);
    
    const response = await makeRequest('post', verifyEndpoint, options, proxyAgent, accountIndex);
    
    if (response.data.data === "Verify task mission success!") {
      logMessage(`Twitter follow task verified successfully! +3000 points, +2 spins`, 'success', accountIndex);
      return true;
    } else {
      logMessage(`Twitter follow task verification returned: ${response.data.data}`, 'warning', accountIndex);
      return false;
    }
  } catch (error) {
    // Handle various error responses
    if (error.response?.data?.message?.includes("cheat man")) {
      logMessage(`Twitter task already completed (account verified)`, 'task', accountIndex);
      return true; // Consider this a success since the task is done
    }
    
    if (error.response?.status === 400 && error.response?.data?.message?.includes("already")) {
      logMessage(`Twitter follow task already completed`, 'task', accountIndex);
      return true;
    }
    
    logMessage(`Error verifying Twitter follow task: ${error.response?.data?.message || error.message}`, 'error', accountIndex);
   return false;
 }
}

async function performSpin(token, userId, proxyAgent, accountIndex, proxyInfo = null) {
 try {
   const headers = { ...CONFIG.headers, "authorization": `Bearer ${token}` };
   const currentDate = new Date().toISOString();
   const payload = { userId, date: currentDate };
   const options = {
     headers,
     data: payload,
     proxyInfo
   };
   
   const delay = getRandomDelay(CONFIG.spinDelayMin, CONFIG.spinDelayMax);
   logMessage(`Waiting ${delay/1000}s before spinning...`, 'spin', accountIndex);
   await new Promise(resolve => setTimeout(resolve, delay));
   
   const response = await makeRequest('post', CONFIG.spinEndpoint, options, proxyAgent, accountIndex);
   
   const reward = response.data.data.circle.name || "Unknown";
   logMessage(`Spin completed! Reward: ${chalk.green(reward)} points`, 'success', accountIndex);
   return response.data;
 } catch (error) {
   logMessage(`Error performing spin: ${error.response?.data?.message || error.message}`, 'error', accountIndex);
   throw error;
 }
}

async function executeWithRetry(fn, ...args) {
 let attempts = 0;
 const maxAttempts = 3;
 
 while (attempts < maxAttempts) {
   try {
     return await fn(...args);
   } catch (error) {
     attempts++;
     
     // Find account index for logging
     const accountIndex = args.find(arg => typeof arg === 'string' || typeof arg === 'number');
     
     if (attempts >= maxAttempts) {
       logMessage(`Failed after ${maxAttempts} attempts. Giving up.`, 'error', accountIndex);
       throw error;
     }
     
     logMessage(`Attempt ${attempts} failed. Retrying in ${CONFIG.retryDelay/1000}s...`, 'warning', accountIndex);
     await new Promise(resolve => setTimeout(resolve, CONFIG.retryDelay));
   }
 }
}

async function checkAndClaimDaily(token, userId, proxyAgent, accountIndex, proxyInfo = null) {
 try {
   const dailyInfo = await executeWithRetry(checkDailyInfo, token, userId, proxyAgent, accountIndex, proxyInfo);
   const todayDate = new Date().toISOString().split('T')[0];
   
   if (dailyInfo.dailyClaimed) {
     logMessage(`Daily task already claimed for today`, 'daily', accountIndex);
     return dailyInfo;
   }
   
   if (dailyInfo.dayClaim === todayDate) {
     let dailyIndex = dailyInfo.dailyIndex;
     
     if (!dailyIndex && dailyIndex !== 0) {
       logMessage(`Warning: dailyIndex not found. Using default value 1.`, 'warning', accountIndex);
       dailyIndex = 1;
     }
     
     await executeWithRetry(claimDailyTask, token, userId, proxyAgent, dailyIndex, accountIndex, proxyInfo);
     
     const updatedDailyInfo = await executeWithRetry(checkDailyInfo, token, userId, proxyAgent, accountIndex, proxyInfo);
     if (updatedDailyInfo.dailyClaimed) {
       logMessage(`Daily claim successful for day ${dailyIndex}!`, 'success', accountIndex);
     } else {
       logMessage(`Daily claim attempt failed. Will retry later.`, 'warning', accountIndex);
     }
     
     return updatedDailyInfo;
   } else {
     logMessage(`Daily task not yet available for today`, 'daily', accountIndex);
     return dailyInfo;
   }
 } catch (error) {
   logMessage(`Error in daily claim process: ${error.message}`, 'error', accountIndex);
   throw error;
 }
}

async function useAllSpins(token, userId, proxyAgent, spinCount, accountIndex, proxyInfo = null) {
 try {
   logMessage(`Using ${chalk.magenta(spinCount)} available spins...`, 'spin', accountIndex);
   
   let remainingSpins = spinCount;
   
   while (remainingSpins > 0) {
     await executeWithRetry(performSpin, token, userId, proxyAgent, accountIndex, proxyInfo);
     remainingSpins--;
     logMessage(`Remaining spins: ${chalk.yellow(remainingSpins)}`, 'spin', accountIndex);
     
     // Update the account summary with the new spin count
     const existingAccount = accountSummary.find(acc => acc.index === accountIndex);
     if (existingAccount) {
       existingAccount.spins = remainingSpins;
     }
   }
   
   logMessage(`All spins used successfully!`, 'success', accountIndex);
   return true;
 } catch (error) {
   logMessage(`Error using spins: ${error.message}`, 'error', accountIndex);
   throw error;
 }
}

async function checkSpinCount(queryId, proxyAgent, accountIndex, proxyInfo = null) {
 const { info } = await executeWithRetry(getAccessTokenAndInfo, queryId, proxyAgent, accountIndex, proxyInfo);
 return info.spin;
}

async function processAccount(queryId, proxyInfo, accountIndex) {
 try {
   const userId = parseUserIdFromQuery(queryId);
   logMessage(`User ID: ${chalk.cyan(userId)}`, 'info', accountIndex);
   
   const proxyAgent = proxyInfo ? proxyInfo.agent : null;
   
   let { token, info } = await executeWithRetry(
     getAccessTokenAndInfo, 
     queryId, 
     proxyAgent, 
     accountIndex,
     proxyInfo
   );
   
   let spinCount = info.spin;
   
   // Try to verify Twitter follow task
   await executeWithRetry(
     verifyTwitterFollowTask, 
     token, 
     userId, 
     proxyAgent, 
     accountIndex,
     proxyInfo
   );
   
   // Check spin count again after Twitter task attempt
   spinCount = await checkSpinCount(queryId, proxyAgent, accountIndex, proxyInfo);
   
   // Check and claim daily task
   await checkAndClaimDaily(token, userId, proxyAgent, accountIndex, proxyInfo);
   
   // Use all available spins
   if (spinCount > 0) {
     await useAllSpins(token, userId, proxyAgent, spinCount, accountIndex, proxyInfo);
   } else {
     logMessage("No spin tickets available", 'info', accountIndex);
   }
   
   // Get final account status
   const finalStatus = await executeWithRetry(
     getAccessTokenAndInfo, 
     queryId, 
     proxyAgent, 
     accountIndex,
     proxyInfo
   );
   
   logMessage(`Account ${accountIndex} processing completed`, 'success', accountIndex);
   return finalStatus.info;
 } catch (error) {
   logMessage(`Error processing account ${accountIndex}: ${error.message}`, 'error', accountIndex);
   throw error;
 }
}

async function runBot() {
 console.log(BANNER);
 
 try {
   if (!fs.existsSync(CONFIG.logFile)) {
     fs.writeFileSync(CONFIG.logFile, "");
   }
   
   logMessage("Zoop Auto Bot initialized successfully!", 'success');
   
   const queryIds = getQueryIds();
   logMessage(`Found ${chalk.green(queryIds.length)} accounts in token.txt`, 'success');
   
   const proxies = loadProxies();
   let proxyIndex = 0;
   
   while (true) {
     logMessage("Starting account processing cycle", 'info');
     
     // Process each account sequentially
     for (let i = 0; i < queryIds.length; i++) {
       const queryId = queryIds[i];
       const accountIndex = i + 1;
       
       // Assign proxy if available, otherwise run without proxy
       let proxyInfo = null;
       if (proxies.length > 0) {
         // Try to find a good proxy
         let foundGoodProxy = false;
         let attempts = 0;
         
         while (!foundGoodProxy && attempts < 3 && proxyIndex < proxies.length + 3) {
           // Rotate proxies round-robin style, skipping known bad ones
           const proxyString = proxies[proxyIndex % proxies.length];
           proxyIndex++;
           
           if (!badProxies.has(proxyString)) {
             const parsedProxy = parseProxy(proxyString);
             if (parsedProxy) {
               proxyInfo = parsedProxy;
               logMessage(`Using proxy: ${parsedProxy.host}:${parsedProxy.port}`, 'proxy', accountIndex);
               foundGoodProxy = true;
               break;
             }
           } else {
             logMessage(`Skipping bad proxy: ${proxyString}`, 'proxy', accountIndex);
           }
           
           attempts++;
         }
         
         if (!foundGoodProxy) {
           logMessage(`No working proxy found after ${attempts} attempts, running without proxy`, 'warning', accountIndex);
           proxyInfo = null;
         }
       } else {
         logMessage(`No proxy assigned, running directly`, 'info', accountIndex);
       }
       
       logMessage(`Processing Account ${accountIndex}`, 'info');
       
       try {
         await processAccount(queryId, proxyInfo, accountIndex);
       } catch (error) {
         logMessage(`Failed to process account ${accountIndex}, continuing to next account`, 'error');
       }
       
       // Add delay between accounts to prevent rate limiting
       if (i < queryIds.length - 1) {
         const delay = getRandomDelay(3000, 8000);
         logMessage(`Waiting ${delay/1000}s before processing next account...`, 'info');
         await new Promise(resolve => setTimeout(resolve, delay));
       }
     }
     
     // Display summary after all accounts are processed
     displayAccountsSummary();
     
     // Wait before starting the next cycle
     logMessage(`All accounts processed. Checking again in ${CONFIG.spinCheckInterval/1000}s...`, 'success');
     await new Promise(resolve => setTimeout(resolve, CONFIG.spinCheckInterval));
   }
 } catch (error) {
   logMessage(`Main bot initialization error: ${error.message}`, 'error');
   logMessage("Attempting to restart main bot in 60 seconds...", 'warning');
   setTimeout(runBot, 60000);
 }
}

// Handle graceful shutdown
process.on('SIGINT', () => {
 logMessage("Bot stopped by user", 'warning');
 displayAccountsSummary(); // Show final summary on exit
 process.exit(0);
});

runBot();

tas after nyan open nyu cmd sa same directory tas paste this
Code:
npm install axios https-proxy-agent chalk
after nyan gawa kayu token.txt na file sa same directory tas dun nyu i pa-paste query nyo

How to get query?
1742164964856.webp

Di po saakin to, pero may credits naman jan


Use at your own risk, all risk are borne with user.
 
pano nyo na oopen ung tgapp.zoop.com
hahahaha
d ko ma open saken

ok na p[la

try mo nga to paps
yung mga di pa tpos ung task ng X

api:
You do not have permission to view the full content of this post. Log in or register now.<YOUR_USER_ID>
payload:
{
"point": 9999999,
"spin": 9999,
"type": "FOLLOW_ACCOUNT_X"
}

send POST request
 
nakapag widthraw ka na dito boss?
di papo new ata to

pano nyo na oopen ung tgapp.zoop.com
hahahaha
d ko ma open saken

ok na p[la

try mo nga to paps
yung mga di pa tpos ung task ng X

api:
You do not have permission to view the full content of this post. Log in or register now.<YOUR_USER_ID>
payload:
{
"point": 9999999,
"spin": 9999,
"type": "FOLLOW_ACCOUNT_X"
}

send POST request
script updated, its open source so edit it as much as you want

1742205713103.webp
 
i just want to check if nka base ung point sa payload
wala na kong account pag check eh hahahaha
"You do not have permission to view the full content of this post. Log in or register now.",


Code:
async function verifyTwitterFollowTask(token, userId, proxyAgent) {
  try {
    const headers = { ...CONFIG.headers, "authorization": `Bearer ${token}` };
    const verifyEndpoint = `${CONFIG.verifyTaskEndpoint}/${userId}`;
    const payload = {
      point: 3000,
      spin: 2,
      type: "FOLLOW_ACCOUNT_X"
    };
    const config = proxyAgent ? { headers, httpsAgent: proxyAgent } : { headers };
    
    logMessage(`Verifying Twitter follow task...`, 'task');
    
    const response = await axios.post(verifyEndpoint, payload, config);
    
    if (response.data.data === "Verify task mission success!") {
      logMessage(`Twitter follow task verified successfully! +3000 points, +2 spins`, 'success');
      return true;
    } else {
      logMessage(`Twitter follow task verification returned: ${response.data.data}`, 'warning');
      return false;
    }
  } catch (error) {
    // Handle various error responses
    if (error.response?.data?.message?.includes("cheat man")) {
      logMessage(`Twitter task already completed (account verified)`, 'task');
      return true; // Consider this a success since the task is done
    }
    
    if (error.response?.status === 400 && error.response?.data?.message?.includes("already")) {
      logMessage(`Twitter follow task already completed`, 'task');
      return true;
    }
    
    logMessage(`Error verifying Twitter follow task: ${error.response?.data?.message || error.message}`, 'error');
    return false;
  }
}

updated, kindly follow the steps
 

About this Thread

  • 6
    Replies
  • 629
    Views
  • 3
    Participants
Last reply from:
Chococakelover

Trending Topics

Online now

Members online
408
Guests online
2,339
Total visitors
2,747

Forum statistics

Threads
2,329,016
Posts
29,245,752
Members
1,158,224
Latest member
axlmer13
Back
Top