vdropvdrop
Kembali
API v1 · Stable

API Documentation

Dokumentasi lengkap API vdrop. Upload file, dapat link, share ke siapa aja — tanpa akun.

Pendahuluan

API vdrop publik dan ga butuh autentikasi. Semua endpoint bisa diakses langsung tanpa API key, token, atau login.

Base URL:

base-url
https://vdrop.web.id

Autentikasi

API vdrop ga butuh autentikasi. Rate limit berlaku per IP address. Kalau butuh limit lebih tinggi, hubungi hello@vdrop.web.id.

Rate Limit

Buat cegah abuse, API dibatasi per IP address:

  • 30 request/jam per IP untuk semua endpoint
  • Lewat limit: HTTP 429 Too Many Requests
  • Header: X-RateLimit-Limit, X-RateLimit-Remaining, X-RateLimit-Reset
response
HTTP/1.1 429 Too Many Requests X-RateLimit-Limit: 30 X-RateLimit-Remaining: 0 { "error": "Rate limit exceeded", "retryAfter": 3600 }

Upload File

Upload file baru. Dapet link pendek buat dibagikan.

Endpoint

POST
POST /vdrop/upload Content-Type: multipart/form-data

Parameter

  • file — File yang mau di-upload (wajib, maks 50MB)
  • expiry — Masa berlaku (opsional, default: never)

Nilai expiry yang valid

  • never — Permanen (default)
  • 1h — 1 jam
  • 1d — 1 hari
  • 7d — 7 hari
  • 30d — 30 hari
  • 1y — 1 tahun

Response sukses

200 OK
{ "success": true, "url": "https://vdrop.web.id/a1b2c3.png", "slug": "a1b2c3", "ext": ".png", "size": 204800, "expiresAt": null }

Response error

4xx
// 400 — file kosong { "error": "File tidak ada" } // 413 — file > 50MB { "error": "File terlalu besar (maks 50MB)" } // 400 — ekstensi diblokir { "error": "Tipe file tidak diizinkan" }

Download File

Download atau preview file berdasarkan slug.

GET
GET /vdrop/download/:slug

Error Codes

  • 200 — Sukses
  • 400 — Request tidak valid
  • 404 — File tidak ditemukan
  • 413 — File melebihi 50MB
  • 429 — Rate limit terlampaui
  • 500 — Error internal server

Contoh Kode

curl

terminal
curl -X POST https://vdrop.web.id/vdrop/upload \ -F "file=@gambar.png" \ -F "expiry=7d"

JavaScript

javascript
const formData = new FormData(); formData.append('file', fileInput.files[0]); formData.append('expiry', '7d'); const res = await fetch('https://vdrop.web.id/vdrop/upload', { method: 'POST', body: formData, }); const { url } = await res.json(); console.log(url); // https://vdrop.web.id/a1b2c3.png

Python

python
import requests with open('gambar.png', 'rb') as f: res = requests.post( 'https://vdrop.web.id/vdrop/upload', files={'file': f}, data={'expiry': '7d'}, ) print(res.json()['url'])

Created by Radit DVC · hello@vdrop.web.id