
🔑 How to get your GoFile API token
GoFile gives every account an API token — grab it from your profile and you can script uploads immediately.
- Create a free GoFile account. Sign up at gofile.io.
- Copy your API token. Open your profile page (gofile.io/myProfile) — the API token is listed there.
- Upload a file. POST the file to the upload endpoint with your token, e.g. curl -F "file=@photo.jpg" -F "token=YOUR_TOKEN" https://upload.gofile.io/uploadfile.
- Manage content. Use the API to create folders, set options, and manage uploads under your account.
📚 Documentation & Examples
Everything you need to integrate with GoFile
🚀 Quick Start Examples
// GoFile API Example
const response = await fetch('https://gofile.io/api', {
method: 'GET',
headers: {
'Content-Type': 'application/json'
}
});
const data = await response.json();
console.log(data);The Gofile API offers a powerful solution for users needing to upload files of any size without incurring costs. This free service ensures that you can effortlessly store and share massive files without worrying about storage limits or financial constraints. With an intuitive interface and straightforward documentation available at gofile.io/api, developers can quickly integrate unlimited file uploads into their applications. This API is designed to accommodate various file types, making it an ideal choice for developers who need a reliable and scalable file management solution.
Utilizing the Gofile API provides numerous advantages, including ease of use, no size restrictions on uploads, support for multiple file formats, fast upload speeds, and comprehensive documentation to streamline the integration process. These benefits position Gofile as an ideal choice for both individual and business users looking to efficiently manage their file storage needs. Below is a simple JavaScript code example for calling the Gofile API to upload a file:
const fs = require('fs');
const axios = require('axios');
async function uploadFile(filePath) {
const file = fs.createReadStream(filePath);
try {
const response = await axios.post('https://api.gofile.io/uploadFile', file, {
headers: {
'Content-Type': 'multipart/form-data',
}
});
console.log('File uploaded successfully:', response.data);
} catch (error) {
console.error('Error uploading file:', error);
}
}
uploadFile('path/to/your/file.ext');
- Unlimited file size uploads
- Completely free to use
- Supports a wide range of file formats
- Fast upload speeds for improved user experience
- Comprehensive and user-friendly documentation
Getting Started — No API Key Required
Gofile lets you upload anonymously with no API key or account. Uploading without credentials automatically creates a temporary guest account and returns a download-page link.
The current flow is two steps: first ask the API for the best upload server, then POST your file to it.
// 1. Get an available upload server
const { data } = await fetch('https://api.gofile.io/servers').then(r => r.json());
const server = data.servers[0].name;
// 2. Upload the file to that server
const form = new FormData();
form.append('file', fileInput.files[0]);
const res = await fetch(`https://${server}.gofile.io/contents/uploadfile`, {
method: 'POST',
body: form
});
console.log(await res.json());
Optional: create a free account and copy your API token from your profile page to tie uploads to your account. Send it as Authorization: Bearer YOUR_TOKEN. See gofile.io/api for the full endpoint list.
Security Assessment
❓ Frequently Asked Questions
Is the GoFile API free?
Yes — free accounts can upload via API. Premium tiers add features, longer retention, and direct-link options; check gofile.io for current plan details.
Where is my GoFile API token?
On your profile page at gofile.io/myProfile after logging in. No separate developer registration is needed.
What are alternatives to the GoFile API for file hosting?
AnonFiles-style hosts come and go; stable alternatives include file.io, transfer.sh (self-host), Uploadcare, and S3-compatible object storage (Cloudflare R2, Backblaze B2) for production use.









