Domain ID | Domain |
0 | 1fichier.com |
1 | alterupload.com |
2 | cjoint.net |
3 | desfichiers.com |
4 | dfichiers.com |
5 | megadl.fr |
6 | mesfichiers.org |
7 | piecejointe.net |
8 | pjointe.com |
9 | tenvoi.com |
10 | dl4free.com |
GET https://api.1fichier.com/v1/upload/get_upload_server.cgi HTTP/1.1
Return (JSON)
{
"url": "invalid_node.1fichier.com",
"id": "example_invalid"
}
url: Host name of the server (alphanumeric)$ curl -H "Content-Type: application/json" -X POST https://api.1fichier.com/v1/upload/get_upload_server.cgi -d '{"pretty":1}'
{ "url" : "example.1fichier.com", "id" : "ExampleToken" }
POST /upload.cgi?id=UploadId HTTP/1.1
Content-Length: // (required) full size of the upload - limited to 500GB
Cookie: // (optional) Cookie identification issued by the site. Link files sent to an account.
Authorization: Basic: // (optional, not requested by the server - to force -) to link the files to an account. Password in clear
Authorization: Bearer "API Key" // Using the API Key to authenticate (IP/Country restrictions not applied)
POST parameters :
"mail" : "[email protected]" // (optional) to receive an email notification
"did" : 0 // (only valid if identified) Numeric identifier of the file destination folder. If invalid, the file will be deposited at the root of the account.
"user" : "[email protected]" // (only valid if unidentified) email address of the registered user receiving the files. The files will be placed in the "incoming" folder and will only be accessible by the owner of the account. The parameter can also be used for identification (coupled to the "pass" parameter)
"pass" : "password" // (optional) Account password (login "user" / "pass")
"domain" : 0 // (optional) The numerical identifier of the destination domain. Default 1fichier.com/"0" (see table)
"dpass" : "password" // (optional) Password to access files. Access to the files will be protected by password.
"mails" : "[email protected]" // (optional) Notification to your contacts, 250 characters max by email, 20 emails maximum.
"message" : "Mon message..." // (optional) Message for notification to contacts, up to 2000 characters.
"file[]" : ... // (required) The files to be sent (maximum 500 per upload)
// Beta: If the filename contains a path separated by slashes (/), this will be taken into account (the folders will be created if necessary). Limited to 30 different paths per upload.
GET parameter :
"id" : "UploadID" // Temporary unique identifier of issue. Composed of 10 random alphanumeric characters.
Return | ||
Code | Meaning | Details |
200 | Return program OK |
The program has completed successfully. If there was an error, it was handled.
The return may consist of:
|
302 | Redirection (Location: /end.pl?xid=UploadID ) | Most common return: Redirection to the program report display (download and removal links) |
500 | Internal Server Error | Fatal / unmanaged error |
$ curl -H "Authorization: Bearer API_KEY" -v -F "file[]=@local_filename.txt;filename=Filename.txt" https://upload.1fichier.com/upload.cgi?id=UPLOAD_ID
HTTP/1.1 302 Found Location: /end.pl?xid=UPLOAD_ID Connection: close Cache-Control: no-cache, no-store, must-revalidate
GET /end.pl?xid=UploadID HTTP/1.1
Export: 1 // (optional) displays a basic CSV export instead of a web page.
JSON: 1 // (optional) displays a formatted JSON export instead of a web page. If Json = 2, display readable output for debugging.
CSV return (complete example):
GET /end.pl?xid=1234567890 HTTP/1.1
Export: 1
HTTP/1.1 200 OK
Content-Type: text/csv
Filename;Size;Objet;Remove;DomainID;WhirlpoolChecksum
Filename : File name
{
"incoming" : 0,
"links" : [
{
"download" : "https://1fichier.com/?abcef",
"filename" : "Filename.ext",
"remove" : "https://1fichier.com/remove/abcef/ghij",
"size" : "123456",
"whirlpool" : "00000000000000"
}
]
}
incoming : If the files are placed in the "incoming" folder (accessible only to the identified user)
POST https://api.1fichier.com/v1/download/get_token.cgi HTTP/1.1
Authorization: Bearer "API Key"
Paramètres POST/JSON :
{
"url" : "https://1fichier.com/?example",
"inline" : 0/1,
"cdn" : 0/1,
"restrict_ip" : 0/1/2,
"single" : 0/1,
"pass" : "mot_de_pass",
"no_ssl" : 0/1,
"folder_id" : 1234,
"filename" : "FileName",
"sharing_user" : "[email protected]"
}
url : Download link
{
"url" : "https://download_URL",
"status" : "OK/KO",
"message" : "Information message"
}
url : URL for direct access to the requested resource (CDN Offer: can be used by your Customers to maintain full control over your data)
status : Status of the request
$ curl -H "Authorization: Bearer API_KEY" -H "Content-Type: application/json" -X POST -i https://api.1fichier.com/v1/download/get_token.cgi -d '{"url":"https://1fichier.com/?sample_link","pretty":1}'
{ "status" : "OK", "url" : "https://sample_token_link" }
POST https://api.1fichier.com/v1/file/ls.cgi HTTP/1.1
Authorization: Bearer "API Key"
Parametres POST/JSON :
{
"folder_id" : 12345,
"sharing_user" : "[email protected]",
"sent_before" : "YYYY-MM-DD HH:II:SS",
"sent_after" : "YYYY-MM-DD HH:II:SS"
}
folder_id : (optional) Folder identifier. Root if unspecified or 0. -1 allow to list all files of the account
{
"status" : "OK",
"count" : 1234,
"items" : [
{
"url" : "https://1fichier.com/?example",
"filename" : "Example.dat",
"size" : 1234,
"date" : "YYYY-MM-DD HH:MM:SS",
"checksum" : "checksum",
"content-type": "content/type",
"pass" : 0/1,
"acl" : 0/1,
"cdn" : 0/1
},
{
"url" : "https://1fichier.com/?example",
"filename" : "Example.dat",
"size" : 1234,
"date" : "YYYY-MM-DD HH:MM:SS",
"checksum" : "checksum",
"content-type": "content/type",
"pass" : 0/1,
"acl" : 0/1,
"cdn" : 0/1
}
]
}
url : Not specified for groupwares with hidden links feature$ curl -H "Authorization: Bearer API_KEY" -H "Content-Type: application/json" -X POST -i https://api.1fichier.com/v1/file/ls.cgi -d '{"folder_id":0,"pretty":1}'
{ "status" : "OK", "count" : 4, "items" : [ { "acl" : 1, "checksum" : "sample_checksum", "filename" : "dkny_em.PNG", "date" : "2014-11-20 08:18:01", "cdn" : 0, "content-type" : "image/png", "size" : 97482, "pass" : 0, "url" : "https://1fichier.com/?sample_link" }, { "acl" : 0, "checksum" : "sample_checksum", "filename" : "search", "content-type" : "text/html; charset=utf-8", "size" : 80338, "pass" : 0, "url" : "https://1fichier.com/?sample_link", "date" : "2017-08-20 22:58:28", "cdn" : 0 }, { "url" : "https://1fichier.com/?sample_link", "size" : 81382, "content-type" : "text/html; charset=utf-8", "pass" : 0, "date" : "2017-08-20 22:54:15", "cdn" : 0, "checksum" : "sample_checksum", "filename" : "search.html", "acl" : 0 }, { "cdn" : 0, "date" : "2014-12-19 23:55:51", "pass" : 0, "size" : 11273654, "content-type" : "video/mp4; charset=binary", "url" : "https://1fichier.com/?sample_link", "acl" : 0, "filename" : "BICHES.mp4", "checksum" : "sample_checksum" } ] }
POST https://api.1fichier.com/v1/file/info.cgi HTTP/1.1
Authorization: Bearer "API Key"
POST/JSON parameters :
{
"url" : "https://1fichier.com/?example",
"pass" : "password",
"folder_id" : 1234,
"filename" : "Filename",
"sharing_user" : "[email protected]"
}
pass : (optional) Access password to the file, if restricted by password.
{
"url" : "https://1fichier.com/?example",
"filename" : "Example.dat",
"size" : 1234,
"date" : "YYYY-MM-DD HH:MM:SS",
"folder_id" : 1234,
"path" : "ExampleA/ExampleB",
"checksum" : "checksum",
"content_type" : "mime/type",
"description" : "File description",
"pass" : 0,
"no_ssl" : 0,
"inline" : 0,
"cdn" : 0,
"acl" : 0,
"acl" : {
"ip" : [ "IP_CIDR_address", "IP_CIDR_address", ... ],
"country" : [ "2 characters ISO country code", ... ],
"email" : [ "email1", "email2", ... ],
"premium": 0/1
}
}
url : Download link. Not specified if groupware share with the hidden link feature$ curl -H "Authorization: Bearer API_KEY" -H "Content-Type: application/json" -X POST -i https://api.1fichier.com/v1/file/info.cgi -d '{"url":"https://1fichier.com/?sample_link","pretty":1}'
{ "checksum" : "sample_checksum", "content-type" : "video/mp4; charset=binary", "filename" : "BICHES.mp4", "size" : 11273654, "date" : "2014-12-19 23:55:51", "acl" : "", "description" : "", "cdn" : 0, "inline" : 0, "pass" : 0, "url" : "https://1fichier.com/?sample_link", "path" : "", "folder_id" : 0 }
POST https://api.1fichier.com/v1/file/scan.cgi HTTP/1.1
Authorization: Bearer "API Key"
Parametres POST/JSON :
{
"url" : "https://1fichier.com/?example"
}
JSON return (pretty):
{
"status" : "OK/KO",
"message" : "scan informations",
"date" : "YYYY-MM-DD HH:II:SS"
}
status : Scan status$ curl -H "Authorization: Bearer API_KEY" -H "Content-Type: application/json" -X POST -i https://api.1fichier.com/v1/file/scan.cgi -d '{"url":"https://1fichier.com/?sample_link","pretty":1}'
{ "date" : "2018-09-20 04:10:17", "status" : 'KO' }
POST https://api.1fichier.com/v1/file/rm.cgi HTTP/1.1
Authorization: Bearer "API Key"
POST/JSON parameters :
{
"files" : [
{
"url" : "https://1fichier.com/?example",
"code" : "ABCDEF"
},
{
"url" : "https://1fichier.com/?example2",
"code" : "GHIJK"
},
{
"url" : "https://1fichier.com/?exampleN",
"code" : "LMLNO"
}
]
}
url : Download link to remove.
{
"status" : "OK/KO",
"removed" : 2,
"urls" : [ "link", "link1", "linkN" ]
}
status : Request status$ curl -H "Authorization: Bearer API_KEY" -H "Content-Type: application/json" -X POST -i https://api.1fichier.com/v1/file/rm.cgi -d '{"pretty":1,"files":[{"url":"https://1fichier.com/?sample_link"}]}'
{ "removed" : 1, "status" : 'KO', "urls" : [ "https://1fichier.com/?sample_link" ] }
POST https://api.1fichier.com/v1/file/mv.cgi HTTP/1.1
Authorization: Bearer "API Key"
Parametres POST/JSON :
{
"urls" : [ "https://1fichier.com/?example", "https://1fichier.com/?example1", "https://1fichier.com/?exampleN" ],
"destination_folder_id" : 12345,
"destination_user" : "[email protected]",
"rename" : "New Filename"
}
urls : List (array) of files (download links) to move.
{
"status" : "OK/KO",
"moved" : 12,
"urls" : [ "link", "link1", "linkN" ],
"filename" : "new filename"
}
status : Request status$ curl -H "Authorization: Bearer API_KEY" -H "Content-Type: application/json" -X POST -i https://api.1fichier.com/v1/file/mv.cgi -d '{"pretty":1,"destination_folder_id":12,"urls":["https://1fichier.com/?sample1","https://1fichier.com/?sample2","https://1fichier.com/?sample3"]}'
{ "urls" : [ "https://1fichier.com/?sample1", "https://1fichier.com/?sample2", "https://1fichier.com/?sample3" ], "status" : 'KO', "moved" : 3 }
POST https://api.1fichier.com/v1/file/rename.cgi HTTP/1.1
Authorization: Bearer "API Key"
POST/JSON parameters :
{
"urls" : [
{
"url" : "https://1fichier.com/?example",
"filename" : "new_filename"
},
{
"url" : "https://1fichier.com/?example",
"filename" : "new_filename"
},
{
"url" : "https://1fichier.com/?example",
"filename" : "new_filename"
}
],
"pretty" : 0/1
}
urls : List (array) of files (download links) to rename.
{
"status" : "OK/KO",
"renamed" : 12,
"urls": [
{
"url" : "https://1fichier.com/?from_url",
"old_filename" : "OldFilename",
"new_filename" : "NewFilename"
},
{
"url" : "https://1fichier.com/?from_url",
"old_filename" : "OldFilename",
"new_filename" : "NewFilename"
},
{
"url" : "https://1fichier.com/?from_url",
"old_filename" : "OldFilename",
"new_filename" : "NewFilename"
}
]
}
status : Request status
POST https://api.1fichier.com/v1/file/cp.cgi HTTP/1.1
Authorization: Bearer "API Key"
POST/JSON parameters :
{
"urls" : [ "https://1fichier.com/?example", "https://1fichier.com/?example1", "https://1fichier.com/?exampleN" ],
"folder_id" : 12345,
"pass" : "password",
"sharing_user" : "[email protected]",
"rename" : "New Filename"
}
urls : List (array) of files (download links) to copy.
{
"status" : "OK/KO",
"copied" : 12,
"urls": [
{
"from_url" : "https://1fichier.com/?from_url",
"to_url": "https://1fichier.com/?destination_url"
},
{
"from_url" : "https://1fichier.com/?from_url1",
"to_url": "https://1fichier.com/?destination_url1"
}
],
"filename" : "new filename"
}
status : Request status$ curl -H "Authorization: Bearer API_KEY" -H "Content-Type: application/json" -X POST -i https://api.1fichier.com/v1/file/cp.cgi -d '{"pretty":1,"folder_id":destination_folder_id,"urls":["https://1fichier.com/?sample1","https://1fichier.com/?sample2","https://1fichier.com/?sample3"]}'
{ "copied" : 3, "status" : "OK", "urls" : [ { "from_url" : "https://1fichier.com/?sample1", "to_url" : "https://1fichier.com/?new_sample1" }, { "from_url" : "https://1fichier.com/?sample2", "to_url" : "https://1fichier.com/?new_sample2" }, { "from_url" : "https://1fichier.com/?sample3", "to_url" : "https://1fichier.com/?new_sample2" } ] }
POST https://api.1fichier.com/v1/file/chattr.cgi HTTP/1.1
Authorization: Bearer "API Key"
Parametres POST/JSON :
{
"urls" : [ "https://1fichier.com/?example", "https://1fichier.com/?example1", "https://1fichier.com/?exampleN" ],
"filename" : "Filename",
"description" : "File Description",
"pass" : "Password",
"no_ssl" : 0/1,
"inline" : 0/1,
"cdn" : 0/1,
"acl" : {
"ip" : [ "IP_CIDR address", "IP_CIDR address", ... ],
"country" : [ "2 characters ISO country code", ... ],
"email" : [ "email1", "email2", ... ],
"premium": 0/1
}
}
urls : List (array) files (download links) to edit.
{
"status" : "OK/KO",
"updated" : 1234,
"urls" : [ "link", "link1", "linkN" ]
}
status : Request status
POST https://api.1fichier.com/v1/folder/ls.cgi HTTP/1.1
Authorization: Bearer "API Key"
POST/JSON parameters:
{
"folder_id" : 12345,
"sharing_user" : "[email protected]",
"files": 0/1
}
folder_id : Identifier of the folder. Root if unspecified or 0.
{
"folder_id" : 12345,
"name" : "FolderName",
"create_date" : YYYY-MM-DD HH:MM:SS,
"shared" : "AccessURL",
"pass" : 0/1,
"shares" : [
{ "email": "Email-1", "rw" : 0/1, "hide_links" : 0/1 },
{ "email": "Email-2", "rw" : 0/1, "hide_links" : 0/1 }
],
"user" : "owner@email",
"rw" : 0/1,
"hide_links" : 0/1,
"files" : 1234,
"size" : 1234,
"sub_folders" : [
{
"id" : 1234,
"name" : "Child_Folder_A",
"create_date" : YYYY-MM-DD HH:MM:SS,
"shared" : "AccessURL",
"pass" : 0/1,
"shares" : [
{ "email": "Email-1", "rw" : 0/1, "hide_links" : 0/1 },
{ "email": "Email-2", "rw" : 0/1, "hide_links" : 0/1 },
],
"user" : "owner@email",
"rw" : 0/1,
"hide_links" : 0/1,
"files" : 1234,
"size" : 1234
}
],
"items" : [
{
"acl" : 1,
"checksum" : "sample_checksum",
"filename" : "dkny_em.PNG",
"date" : "2014-11-20 08:18:01",
"cdn" : 0,
"content-type" : "image/png",
"size" : 97482,
"pass" : 0,
"url" : "https://1fichier.com/?sample_link"
},
{
"acl" : 0,
"checksum" : "sample_checksum",
"filename" : "search",
"content-type" : "text/html; charset=utf-8",
"size" : 80338,
"pass" : 0,
"url" : "https://1fichier.com/?sample_link",
"date" : "2017-08-20 22:58:28",
"cdn" : 0
},
{
"url" : "https://1fichier.com/?sample_link",
"size" : 81382,
"content-type" : "text/html; charset=utf-8",
"pass" : 0,
"date" : "2017-08-20 22:54:15",
"cdn" : 0,
"checksum" : "sample_checksum",
"filename" : "search.html",
"acl" : 0
},
{
"cdn" : 0,
"date" : "2014-12-19 23:55:51",
"pass" : 0,
"size" : 11273654,
"content-type" : "video/mp4; charset=binary",
"url" : "https://1fichier.com/?sample_link",
"acl" : 0,
"filename" : "BICHES.mp4",
"checksum" : "sample_checksum"
}
]
}
shared : Public share using URL like https://1fichier.com/dir/abcdef
POST https://api.1fichier.com/v1/folder/mkdir.cgi HTTP/1.1
Authorization: Bearer "API Key"
POST/JSON parameters :
{
"name" : "New folder name",
"folder_id" : 12345,
"sharing_user" : "[email protected]"
}
name : Folder name
folder_id : (optional) Identifier of the parent folder. Root if unspecified or 0.
sharing_user : (optional) Email of the user sharing a folder (required if groupware sharing the root folder)
JSON return (pretty):
{
"status" : "OK/KO",
"folder_id" : 12345,
"name" : "Folder A",
"message" : "Information message",
}
status : Request status
POST https://api.1fichier.com/v1/folder/share.cgi HTTP/1.1
Authorization: Bearer "API Key"
POST/JSON parameters :
{
"folder_id" : 12345,
"share" : 0/1,
"pass" : "Access password",
"shares" : [
{ "email": "Email 1", "rw" : 0/1, "hide_links" : 0/1 },
{ "email": "Email 2", "rw" : 0/1, "hide_links" : 0/1 },
]
}
folder_id : Folder ID
{
"status" : "OK/KO",
"url" : "AccessURL",
"message" : "Message d'information..."
}
status : Request status
POST https://api.1fichier.com/v1/folder/mv.cgi HTTP/1.1
Authorization: Bearer "API Key"
POST/JSON parameters :
{
"folder_id" : 12345,
"destination_folder_id" : 2345,
"destination_user" : "[email protected]",
"rename" : "new name"
}
folder_id : Folder ID to move (source)
{
"status" : "OK/KO",
"message" : "Information message",
"old_name" : "aaa",
"new_name" : "bbb"
}
message : Description of the possible error
POST https://api.1fichier.com/v1/folder/rm.cgi HTTP/1.1
Authorization: Bearer "API Key"
POST/JSON parameters:
{
"folder_id" : 12345
}
JSON return (pretty):
{
"status" : "OK/KO",
"message" : "Information message"
}
POST https://api.1fichier.com/v1/user/info.cgi HTTP/1.1
Authorization: Bearer "API Key"
POST/JSON parameters (optional - only if you want to change any of these settings) :
{
"ftp_mode" : 0/1,
"ftp_did" : 12345,
"ftp_report" : 0/1,
"ru_report" : 0/1,
"default_domain" : DomainID,
"page_limit" : 123,
"default_port" : 0/1,
"default_port_files" : 0/1,
"use_cdn" : 0/1,
"download_menu" : 0/1
}
ftp_mode : Mode of treatment of files uploaded by FTP. 0/automatic - 1/manual
{
"status" : "OK/KO",
"message" : "Information message...",
"email" : "Email address",
"offer" : 0/1/2,
"2fa" : 0/1/2,
"mail_rm" : 0/1,
"ftp_mode" : 0/1,
"ftp_did" : 12345,
"ftp_report" : 0/1,
"ru_report" : 0/1,
"default_domain" : DomainID,
"page_limit" : 123,
"default_port" : 1/2,
"default_port_files" : 0/1,
"cdn" : 12345.1234,
"download_menu" : 0/1,
"use_cdn" : 0/1,
"subscription_end" : "YYYY-MM-DD HH:MM:II",
"default_quota" : 0, // deprecated
"default_cold_storage_quota" : 1234,
"hot_storage" : 1234,
"cold_storage" : 1234,
"stats_date" : "YYYY-MM-DD HH:MM:II",
"allowed_cold_storage" : 1234,
"available_storage" : 1234,
"available_cold_storage" : 1234,
"extended_quota" : 1234,
"extended_quota_end" : "YYYY-MM-DD HH:MM:II",
"overquota" : 0/1,
"upload_forbidden" : 0/1
}
status : Request status (only if request for modifications),
POST https://api.1fichier.com/v1/ftp/process.cgi HTTP/1.1
Authorization: Bearer "API Key"
JSON return (pretty):
{
"status" : "OK/KO",
"message" : "Message..."
}
status : Request status
POST https://api.1fichier.com/v1/ftp/users/ls.cgi HTTP/1.1
Authorization: Bearer "API Key"
JSON return (pretty):
{
"status" : "OK/KO",
"message" : "Message ...",
"users" : [
{ "user" : "Username1", "folder_id": 12334 },
{ "user" : "Username2", "folder_id": 12335 }
]
}
user : Username
POST https://api.1fichier.com/v1/ftp/users/add.cgi HTTP/1.1
Authorization: Bearer "API Key"
POST/JSON parameters
{
"user" : "Username",
"pass" : "Password",
"folder_id" : 12345
}
JSON return (pretty):
{
"status" : "OK/KO",
"message" : "Information message"
}
POST https://api.1fichier.com/v1/ftp/users/rm.cgi HTTP/1.1
Authorization: Bearer "API Key"
POST/JSON parameters
{
"user" : "Username"
}
JSON return (pretty):
{
"status" : "OK/KO",
"message" : "Information message"
}
POST https://api.1fichier.com/v1/remote/ls.cgi HTTP/1.1
Authorization: Bearer "API Key"
JSON return (pretty):
{
"status" : "OK/KO",
"data": [
{
"id" : 1234,
"request_date": "YYYY-MM-DD HH:MM:SS",
"execution_date": "YYYY-MM-DD HH:MM:SS"
},
{
"id" : 1235,
"request_date": "YYYY-MM-DD HH:MM:SS",
"execution_date": "YYYY-MM-DD HH:MM:SS"
},
{
"id" : 1236,
"request_date": "YYYY-MM-DD HH:MM:SS",
"execution_date": ""
}
]
}
execution_date : Date of execution of the request. Empty if not executed.
POST https://api.1fichier.com/v1/remote/info.cgi HTTP/1.1
Authorization: Bearer "API Key"
POST/JSON parameters
{
"id" : "request_id"
}
JSON return (pretty):
{
"id" : 1234,
"request_date": "YYYY-MM-DD HH:MM:SS",
"execution_date": "YYYY-MM-DD HH:MM:SS",
"links" : [ "http://link1", "http://link2", ... ],
"result" : [
{
"status" : "OK/KO",
"url" : "http://link1",
"download_link" : "https://download_link",
"message" : "Download informations"
}
]
}
links : Request links
POST https://api.1fichier.com/v1/remote/request.cgi HTTP/1.1
Authorization: Bearer "API Key"
POST/JSON parameters
{
"urls" : [ "url1," "url2", ... ],
"folder_id" : 12345,
"headers" : {
"Name1" : "Value1",
"Name2" : "Value2"
}
}
headers/name : Alphanumeric characters accepted, including '-'. Insensitive to the box according to the RFC. We will normalize the variable in lowercase except for the first letter of words (eg Content-Type)
{
"id" : 1234,
"date": "YYYY-MM-DD HH:MM:SS",
"status" : "OK/KO",
"urls" : [ "url1", "url2" ],
"headers" : {
"Name1" : "Value1",
"Name2" : "Value2"
}
}
POST https://1fichier.com/console/account.pl HTTP/1.1
POST parameters
"user" : "[email protected]" // Email...
"pass" : "password" // Password (in clear)
Return (plain/text) or "error" in case of...
1234567890 // Timestamp of the end of the subscription, if Premium or Access (0 if no subscription)
12345.1234 // CDN credits of the account (if > 0 and if the account have the option to use them)
POST https://1fichier.com/console/get_dirs_for_upload.pl HTTP/1.1
POST parameters
"user" : "[email protected]" // Email
"pass" : "password" // Password (clear / plain text)
"pretty" : 0/1 // To have a human readable JSON output
Return (JSON) or redirect to the login page in case of error
[
{ "ID" : 12345, "NAME" : " Folder1" },
{ "ID" : 12346, "NAME" : "- Folder2" },
{ "ID" : 12347, "NAME" : " Folder3" }
]
ID : Folder ID
POST https://1fichier.com/console/get_folder_content.pl HTTP/1.1
POST parameters
"user" : "[email protected]" // Email
"pass" : "password" // Password (clear / plain text)
"pretty" : 0/1 // To have a human readable JSON output
"id" : 12345 // Folder ID
Return (JSON) or redirect to the login page in case of error
[
{ "type" : 'f', "name" : "File1", "url" : "https://1fichier.com/?ABCDEF", "size": 12345, "date" : "YYYY-MM-DD HH:II:SS" },
{ "type" : 'd', "name" : "Folder1", "url" : "https://1fichier.com/console/get_folder_content.pl?id=12345", "date" : "YYYY-MM-DD HH:II:SS" }
]
type : Object type ('f' for a file, 'd' for a directory)
POST https://1fichier.com/console/mkpath.pl HTTP/1.1
POST parameters
"user" : "[email protected]" // Email
"pass" : "password" // Password (clear / plain text)
"path" : "FolderA/FolderB/FolderC" // Path to create
Return in plain text (display an error if need)
FolderA/FolderB/FolderC
12345
1st line : Display the requested path
2nd line : Last folder ID (FolderC on the example)