Sign Up for Free

RunKit +

Try any Node.js package right in your browser

This is a playground to test code. It runs a full Node.js environment and already has all of npm’s 400,000 packages pre-installed, including rapidgator with all npm packages installed. Try it out:

var rapidgator = require("rapidgator")

This service is provided by RunKit and is not affiliated with npm, Inc or the package authors.

rapidgator v0.2.1

Rapidgator API

rapidgator NPM version

Javascript module for accessing the Rapidgator's API


  • Log In to account
  • Upload file by file path
  • Upload file by Buffer
  • Upload file to folder


npm install rapidgator --save


import Rapidgator from "rapidgator";

const loginOptions = {
    login: "yourlogin",
    password: "yourpassword"

const rapidgator = new Rapidgator(loginOptions);

rapidgator.logIn().then(() => {
    const uploadOptionsFilepath = {
        name: "filename.txt",
        filePath: "/tmp/somefile.txt"

    const uploadOptionsBuffer = {
        name: "filename.txt",
        buffer: fs.readFileSync("/tmp/somefile.txt")

    rapidgator.upload(uploadOptionsFilepath).then((url) => console.log(`Your file has been uploaded. URL: ${url}`)).catch(console.error);
}).catch((err) => console.error("Failed on logging in. Error: ", err));


RunKit is a free, in-browser JavaScript dev environment for prototyping Node.js code, with every npm package installed. Sign up to share your code.
Sign Up for Free