Observed since 20 Oct, 18:28 UTC
No superseded metadata states collected. Unchanged observations do not create new revisions.
A typescript client for the 1fichier API
A fully-typed TypeScript client for the 1fichier.com API. Supports all endpoints from the official OpenAPI spec, including file upload/download, folder management, user info, remote upload, and vouchers.
npm install 1fichier
import FichierApiClient from "1fichier";
const client = new FichierApiClient("YOUR_API_KEY");
// Generate a download token
const token = await client.getDownloadToken({ url: "https://1fichier.com/?example" });
console.log(token.url);
// List files in root folder
const files = await client.listFiles({ folder_id: 0 });
console.log(files.items);
All requests require a valid API key. Pass your API key when constructing the client:
const client = new FichierApiClient("YOUR_API_KEY");
getDownloadToken(data) - Generate a download token for a filegetFileInfo(data) - Get detailed info about a filelistFiles(data) - List files in a folderscanFile(data) - Scan a file for virusesremoveFiles(data) - Remove filesmoveFiles(data) - Move filesrenameFiles(data) - Rename filescopyFiles(data) - Copy fileschangeFileAttr(data) - Change file attributesgetUploadServer(pretty) - Get optimal upload serveruploadFiles(formData) - Upload files (multipart/form-data)getUploadResult(xid) - Get upload resultlistFolders(data) - List folderscreateFolder(data) - Create a foldershareFolder(data) - Share a foldermoveFolder(data) - Move a folderremoveFolder(data) - Remove a foldergetUserInfo(data) - Get/set account infolistRemoteUploads() - List remote uploadsgetRemoteUploadInfo(id) - Get remote upload inforequestRemoteUpload(data) - Request remote uploadlistVouchers() - List unused voucherscheckVoucher(data) - Check voucher validityuseVoucher(data) - Use voucherAll request and response schemas are fully typed. See src/types.ts for details.
All methods throw on HTTP/network errors. Use try/catch for error handling:
try {
const info = await client.getFileInfo({ url: "https://1fichier.com/?example" });
} catch (err) {
console.error("API error", err);
}
Unit tests are provided using Vitest. Run tests with:
npm test
Contributions are welcome! To contribute:
src/index.test.ts.git clone https://github.com/nunsie/1fichier-ts.git
cd 1fichier-ts
npm install
npm test
MIT © 2025 Nusrath Khan
Download counts and popularity will appear here as the collector receives them.
This describes our collected data; it is not a security assessment.
Observed since 20 Oct, 18:28 UTC
No superseded metadata states collected. Unchanged observations do not create new revisions.
package:ca75dde5ad2b2d0b34d17ab93677481094cc88d98cb12e7d5e14938a8e2290ae