{"id":25400551,"url":"https://github.com/globaltechinfo/pairing-web","last_synced_at":"2026-04-30T14:35:34.334Z","repository":{"id":277601381,"uuid":"932944757","full_name":"GlobalTechInfo/PAIRING-WEB","owner":"GlobalTechInfo","description":"Session Id Generator For WhatsApp Bots Using Paste Bin","archived":false,"fork":false,"pushed_at":"2025-02-14T20:41:33.000Z","size":133,"stargazers_count":4,"open_issues_count":1,"forks_count":8,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-04-12T00:49:08.659Z","etag":null,"topics":["baileys","baileys-api","baileys-bot","baileys-md","express-pairing","express-session","pair","pairing","qr-code","qrcode","qrcode-generator","qrcode-scanner","web-qr","whatsapp","whatsapp-api","whatsapp-bot"],"latest_commit_sha":null,"homepage":"","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/GlobalTechInfo.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2025-02-14T20:14:37.000Z","updated_at":"2025-03-07T17:39:13.000Z","dependencies_parsed_at":"2025-02-14T21:28:58.050Z","dependency_job_id":"847c7ff3-de9c-4f79-a88c-1664beb6644b","html_url":"https://github.com/GlobalTechInfo/PAIRING-WEB","commit_stats":null,"previous_names":["globaltechinfo/pairing-web"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/GlobalTechInfo%2FPAIRING-WEB","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/GlobalTechInfo%2FPAIRING-WEB/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/GlobalTechInfo%2FPAIRING-WEB/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/GlobalTechInfo%2FPAIRING-WEB/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/GlobalTechInfo","download_url":"https://codeload.github.com/GlobalTechInfo/PAIRING-WEB/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248501913,"owners_count":21114681,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["baileys","baileys-api","baileys-bot","baileys-md","express-pairing","express-session","pair","pairing","qr-code","qrcode","qrcode-generator","qrcode-scanner","web-qr","whatsapp","whatsapp-api","whatsapp-bot"],"created_at":"2025-02-16T00:18:20.248Z","updated_at":"2026-04-30T14:35:34.305Z","avatar_url":"https://github.com/GlobalTechInfo.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Session Id Generator For WhatsApp Bots Using Paste Bin\n\n**It Will Uploads Your Creds To Pastebin And Will Sends You Id Of That File.**\n\n\n**How Session Id Will Works?**\n\u003cdetails\u003e\n  \u003csummary\u003eClick Here To View?\u003c/summary\u003e\n  \u003cp\u003e\n\n  ```js\nimport { fileURLToPath } from 'url';\nimport path from 'path';\nimport { writeFileSync } from 'fs';\nimport axios from 'axios'; // use axios to fetch raw Pastebin data\n\nasync function SaveCreds(txt) {\n  const __filename = fileURLToPath(import.meta.url);\n  const __dirname = path.dirname(__filename);\n  const PasteId = txt.replace('Some-Custom-Words_', '');\n\n  // The 'txt' parameter should contain the Pastebin Id\n  const pastebinUrl = `https://pastebin.com/raw/${PasteId}`;  // Construct raw Pastebin URL\n  console.log(`PASTE URL: ${pastebinUrl}`);\n\n  try {\n    // Fetch the raw data from Pastebin\n    const response = await axios.get(pastebinUrl);\n\n    // Ensure the data is a string or Buffer\n    const data = typeof response.data === 'string' ? response.data : JSON.stringify(response.data);\n\n    // Define the path to save the creds.json file in the session folder\n    const credsPath = path.join(__dirname, '..', 'session', 'creds.json');\n    \n    // Write the fetched data to creds.json\n    writeFileSync(credsPath, data);\n    console.log('Saved credentials to', credsPath);\n    \n  } catch (error) {\n    console.error('Error downloading or saving credentials:', error);\n  }\n}\n\nexport default SaveCreds;\n\n// Exports the `SaveCreds` function as the default export of this module, making it available for use in main file.\n\n\n//Now Import Function In Main File\ndotenv.config()\nimport SaveCreds from './some-file.js'\n\nasync function main() {\n  const txt = process.env.SESSION_ID\n\n  if (!txt) {\n    console.error('Environment variable not found.')\n    return\n  }\n\n  try {\n    await SaveCreds(txt)\n    console.log('process SaveCreds completed.')\n  } catch (error) {\n    console.error('Error:', error)\n  }\n}\n\nmain()\n// Now Use Further code \n```\n\u003c/p\u003e\n\u003c/details\u003e\n\n\n\nBOTH PAIR CODE AND QR CODE WORKING\n\nYOU CAN DEPLOY IT ON ANY CLOUD PLATFORM e.g `HEROKU` `RENDER` `KOYEB` etc.\n\n⭐ THE REPO IF YOU ARE GOING TO COPY OR FORK\n\nNote: Make Sure Put PASTEBIN_API_KEY in environment variables ( Required In Paste.js ) Before Running/Deploying The API.\n\n## OTHER PROJECTS:\n\n- [MEGA SESSION](https://github.com/GlobalTechInfo/WEB-PAIR-QR)\n- [WHATSAPP BOT](https://github.com/GlobalTechInfo/MEGA-AI)\n- [TELEGRAM BOT](https://github.com/GlobalTechInfo/TELEGRAM-AI#readme)\n\n\n\n| [![Qasim Ali](https://github.com/GlobalTechInfo.png?size=100)](https://github.com/GlobalTechInfo) |\n| --- |\n| [Qasim Ali](https://github.com/GlobalTechInfo) |","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fglobaltechinfo%2Fpairing-web","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fglobaltechinfo%2Fpairing-web","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fglobaltechinfo%2Fpairing-web/lists"}