โšก RG-raj API v3

RG Vikramjeet Course Proxy โ€” Manual Users + Dynamic Login + Telegram Bot

๐ŸŸข Online  |  Tokens in pool: ...
๐Ÿ†• v3 โ€” users.js se Manual Token Add karo:
Server root mein users.js file hai. Isme apne userId aur token add karo โ€” server start hote hi sab automatically load ho jaate hain. Jitne chahein utne users add karo!
// users.js
export const MANUAL_USERS = [
  { userId: "123456", token: "eyJhbG...", name: "Rahul" },
  { userId: "789012", token: "eyJhbG...", name: "Priya" },
  // ...aur jitne chahein
];
๐Ÿ”„ How it works (v3):
Path 1 โ€” users.js (NEW): Apne userId+token users.js mein hardcode karo โ†’ Server restart pe auto-load โœ…

Path 2 โ€” Website: User logs in โ†’ Frontend calls POST /api/login โ†’ Pool mein add โœ…

Path 3 โ€” Telegram Bot: /add userId token send karo โ†’ Pool mein add โœ…

Content Access: Sab API calls automatically sahi token use karte hain ๐ŸŽฏ

๐Ÿ†• v3 โ€” Manual Users

GET/api/users NEW v3
Sab manually added + dynamically added users list karo (source bhi dikhega)
GET/api/reload-users NEW v3
users.js se dobara reload karo (bina server restart ke). Secret required.
Query: secret=YOUR_ADMIN_SECRET

๐Ÿ” Authentication

POST/api/login
Website login. Auto-fetches batches, adds to pool, logs to Telegram.
Body: { "userId": "123456", "token": "eyJ..." }

Response: {
  "success": true,
  "userId": "123456",
  "batchCount": 3,
  "batches": [{ "id": "257", "name": "NEET 2025 Batch", "expiry": "..." }]
}
GET/api/add-token?userid=123&token=eyJ...
Manually add token via URL (also logs to Telegram).
POST/api/bulk-login
Ek saath kai tokens add karo. Array bhejo: [{userId, token}]

๐Ÿ“Š Pool Management

GET/api/status
Server status + token count
GET/api/pool
Sab tokens list karo โ€” userId, batch count, source (manual/website/telegram)
GET/api/remove-token?userid=123
Ek token pool se hatao
GET/api/clear-pool?secret=YOUR_ADMIN_SECRET
Pura pool clear karo

๐Ÿ“š Batches / Courses

GET/api/all-batches
Sab tokens ke sab unique courses combined
GET/api/my-courses?userid=123
Kisi specific user ke courses

๐Ÿ“– Course Content

GET/api/subjects?courseid=257
Required: courseid
GET/api/topics?courseid=257&subjectid=1
Required: courseid, subjectid
GET/api/concepts?courseid=257&subjectid=1&topicid=1
Required: courseid, subjectid, topicid
GET/api/videos?courseid=257&subjectid=1&topicid=1&conceptid=1
Video/PDF list for a concept
GET/api/video-details?course_id=257&video_id=12345
Decrypted stream URLs for a video

๐Ÿงช Tests

GET/api/tests?testseriesid=100&subject_id=1
GET/api/questions?url=https://...
Proxy to fetch questions JSON

๐Ÿค– Telegram Bot Setup

GET/api/set-webhook
One-time setup: Vercel URL Telegram pe register karo. Deploy ke baad ek baar call karo!
POST/api/telegram-webhook
Telegram automatically yahan updates bhejta hai (manually mat call karo)

RG-MAXX API v3 โ€ข Vercel Node.js