kyuurzy

Web To Apk

Oct 10th, 2025 (edited)
258
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
JavaScript 2.25 KB | Source Code | 0 0
  1. const axios = require("axios");
  2. const FormData = require("form-data");
  3. const fs = require("fs");
  4.  
  5. async function web2apk(url, email, appName, iconPath) {
  6.   const headers = {
  7.     "accept": "application/json, text/plain, */*",
  8.     "content-type": "application/json;charset=UTF-8",
  9.     "origin": "https://create.appmaker.xyz",
  10.     "referer": "https://create.appmaker.xyz/",
  11.     "user-agent":
  12.       "Mozilla/5.0 (Linux; Android 10; K) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/139.0.0.0 Mobile Safari/537.36",
  13.   };
  14.  
  15.   const buildInit = await axios.post(
  16.     "https://standalone-app-api.appmaker.xyz/webapp/build",
  17.     { url, email },
  18.     { headers }
  19.   );
  20.   const appId = buildInit.data.body.appId;
  21.   const form = new FormData();
  22.   form.append("file", fs.createReadStream(iconPath));
  23.   form.append("id", appId);
  24.  
  25.   const upload = await axios.post(
  26.     "https://standalone-app-api.appmaker.xyz/webapp/build/file-upload",
  27.     form,
  28.     {
  29.       headers: {
  30.         ...form.getHeaders(),
  31.         "origin": "https://create.appmaker.xyz",
  32.         "referer": "https://create.appmaker.xyz/",
  33.       },
  34.     }
  35.   );
  36.  
  37.   const iconUrl = upload.data.cloudStoragePublicUrl;
  38.  
  39.   await axios.post(
  40.     "https://standalone-app-api.appmaker.xyz/webapp/build/build",
  41.     {
  42.       appId,
  43.       appIcon: iconUrl,
  44.       appName,
  45.       isPaymentInProgress: false,
  46.       enableShowToolBar: false,
  47.       toolbarColor: "#03A9F4",
  48.       toolbarTitleColor: "#FFFFFF",
  49.       splashIcon: iconUrl,
  50.     },
  51.     { headers }
  52.   );
  53.  
  54.   let status = "building";
  55.   while (status === "building" || status === "draft") {
  56.     const statusResp = await axios.get(
  57.       `https://standalone-app-api.appmaker.xyz/webapp/build/status?appId=${appId}`,
  58.       { headers }
  59.     );
  60.     status = statusResp.data.body.status;
  61.     if (status !== "success") await new Promise((r) => setTimeout(r, 5000));
  62.   }
  63.  
  64.   const result = await axios.get(
  65.     `https://standalone-app-api.appmaker.xyz/webapp/complete/download?appId=${appId}`,
  66.     { headers }
  67.   );
  68.  
  69.   return {
  70.     appId,
  71.     build: result.data.body,
  72.   };
  73. }
  74.  
  75. //use
  76. const hasil = await web2apk(
  77.   "https://zephrine.live", // web
  78.   "[email protected]", // gmail
  79.   "KyuuRzy", // app
  80.   "./icon.png" // icon
  81. );
  82.  
  83.   console.log(hasil);
Advertisement
Add Comment
Please, Sign In to add comment