Folder1.5
Configure Filedrop
Notes: New API
Description : Activates, or deactivates, a folder as a file drop. Alternatively, updates the folder's file drop configuration.
Required Parameters:
- action : The action to be performed. enable(creates or updates a file drop) or disable (disables a file drop).
- session_token : A type 1 or type 2 session token. (Type 2 will require a call signature).
Relative Parameters:
- signature : Required only for session token version 2. Click here to learn more about building an API call signature.
- folder_key : The destination folderkey. Required if folder_path is not passed. Takes precedence over folder_path. myfiles may be passed as a moniker for device 0's(cloud) root.
- folder_path : The absolute path to a single destination folder in the session user's account. Required if folder_key is not passed.
Optional Parameters:
- allow_description : Whether or not file descriptions will be allowed during upload. no(default) or yes.
- allow_multiple_uploads : Whether or not multiple file uploads will be permitted on File Drop. no(default) or yes.
- embed_size : Width of File Drop in its embedded form. 480(default) or full.
- message : File drop title, up to 90 characters in length.
- notification_emails : Whether or not email notifications will be sent on file uploads. no or yes(default).
- response_format : 'xml' or 'json' (default 'xml')
Copy
Description : Copies a session user's folder and its children to a target destination.
Required Parameters:
- session_token : A type 1 or type 2 session token. (Type 2 will require a call signature).
Relative Parameters:
- signature : Required only for session token version 2. Click here to learn more about building an API call signature.
- folder_key_src : The folderkey source is the folderkey of the desired folder you wish to copy. You can also specify multiple folderkeys separated by commas. folder_path_src is not passed. Takes precedence over folder_path_src.
- folder_path_src : The absolute path to a single folder in the session user's account. Required if folder_key_src is not passed.
Optional Parameters:
- folder_key_dst : The folderkey destination is the folderkey of the desired folder you wish to copy folder(s) to. Takes precedence over folder_path_dst. If folder_key_dst and folder_path_dst are not passed, device 0's(cloud) root is used. Alternatively, 'myfiles' may be passed as a moniker for root.
- folder_path_dst : The absolute path to a single folder in the session user's account. If folder_key_dst and folder_path_dst are not passed, device 0's(cloud) root is used.
- response_format : 'xml' or 'json' (default 'xml')
Response Properties
Name | Description | Type | Value |
---|---|---|---|
asynchronous | Specifies whether the restore is being processed asynchronously. If yes, poll device/get_status to determine when the job is complete | flag | yes, no |
new_folderkeys | The new folderkey that was created if folder_path_dst was used and the destination path did not previously exist | string | |
error | The numerical error code | integer | 112, 114, 259 |
message | The error description for the error | string | |
deprecated | Indicates this API is deprecated and should no longer be used | string | |
new_device_revision | The revision number of the device. Returned only when the revision number has changed. | integer | |
result | Indicates if the API call was successful. 'Error' or "Success' | string | |
new_key | Indicates a new call signature needs calculated. Applicable only when using Session Token v2 | flag | yes, no |
current_api_version | The latest stable API version number | string |
Examples:
Example 1 (Success with JSON - folder owned by session user, folder_key_src, and folder_path_dst):
HTTPS://www.mediafire.com/api/1.5/folder/copy.php?session_token=&folder_key_src=rfoh06y8w3amg&folder_path_dst=Test%20002&response_format=json&signature=
{
action: folder/copy,
asynchronous: no,
new_folderkeys:[
djwm42qh425ze,
]
result: Success,
new_key: yes,
current_api_version: 1.5,
new_device_revision: 162725,
}
Example 2 (Success with XML - public folder not owned by session and folder_key_dst):
HTTPS://www.mediafire.com/api/1.5/folder/copy.php?session_token=&folder_key_src=jaebr616cg651&folder_key_dst=rfoh06y8w3amg&response_format=xml&signature=
<action>folder/copy</action>
<asynchronous>no</asynchronous>
<new_folderkeys>
<new_folderkey>21a1ht4gm4144</new_folderkey>
</new_folderkeys>
<result>Success</result>
<new_key>yes</new_key>
<current_api_version>1.5</current_api_version>
<new_device_revision>162726</new_device_revision>
Example 3 (Failure with JSON - Error 114 with private folder not owned by or shared to session user):
HTTPS://www.mediafire.com/api/1.5/folder/copy.php?session_token=&folder_key_src=buz7yrzism074&response_format=json&signature=
{
action: folder/copy,
message: Access denied,
error: 114,
result: Error,
new_key: yes,
current_api_version: 1.5,
}
Create
Notes: Removed deprecated folder folderkey.
Description: Creates a folder in a specified target destination.
Required Parameters:
- session_token : A type 1 or type 2 session token. (Type 2 will require a call signature).
- foldername : The name of the folder to be created.
Relative Parameters:
- signature : Required only for session token version 2. Click here to learn more about building an API call signature.
Optional Parameters:
- parent_key : The destination folder key. If parent_key and parent_path are not passed, device 0's(cloud) root is used. Takes precedence over parent_path. Alternatively, myfiles may be passed as a moniker for device 0's(cloud) root.
- parent_path : The absolute path to a single destination folder in the session user's account. If parent_key and parent_path are not passed, device 0's(cloud) root is used.
- action_on_duplicate : Specifies the action to take when the folder preexists, by name, in the destination. skip(ignore the create), keep(append a number to the new folder's name)(default), replace(returns the information for the preexisting folder).
- mtime : The creation date of the added folder. If not set, current server time will be used. Refer to the following document for valid date & time formats: http://www.php.net/manual/en/datetime.formats.php
- response_format : 'xml' or 'json' (default 'xml')
Response Properties
Name | Description | Type | Value |
---|---|---|---|
folder_key | The ID for the newly created folder | string | |
parent_folderkey | The ID key of the folder containing the newly created folder. Not returned when the parent folder is device 0's(cloud) root | string | |
name | The name of the newly created folder | string | |
description | The description for the newly created folder | string | |
created | The date and time the new folder was created | string timestamp | |
privacy | Indicates the privacy of the newly created folder. 'public' or 'private' | string | |
file_count | The amount of files contained in the newly created folder | integer | |
folder_count | The amount of folders contained in the newly created folder | integer | |
revision | The revision number of the newly created folder | integer | |
dropbox_enabled | Indicates if the newly created folder is a FileDrop. 'yes' or 'no' | flag | yes, no |
flag | A bitmask value specifying special details about a folder. | bitmask | '1' = 'Folder is owned by the session user'. Other bits not documented are internal MediaFire notations. |
permissions | An array of permission objects | object [] | |
permissions --> value | The specific permission level the user has to the folder | integer | 1(read), 2(read+write), 4(manage)[NOT IN USE] |
permissions --> explicit | Specifies whether the folder owner granted the permission | flag | yes, no |
permissions --> read | Specifies whether the user has read access to the folder | flag | yes, no |
permissions --> write | Specifies whether the user has write access to the folder | flag | yes, no |
upload_key | The upload key of the newly created folder | string | |
error | The numerical error code | integer | 114, 185, 259 |
message | The error description for the error | string | |
deprecated | Indicates this API is deprecated and should no longer be used | string | |
new_device_revision | The revision number of the device. Returned only when the revision number has changed. | integer | |
result | Indicates if the API call was successful. 'Error' or "Success' | string | |
new_key | Indicates a new call signature needs calculated. Applicable only when using Session Token v2 | flag | yes, no |
current_api_version | The latest stable API version number | string |
Error Codes
To view a list of possible error codes for this API, and their descriptions, click here.
Examples:
Example 1 (Success with JSON - parent_key):
HTTPS://www.mediafire.com/api/1.5/folder/create.php?session_token=&foldername=Test%20101&parent_key=rfoh06y8w3amg&response_format=json&signature=
{
action: folder/create,
parent_folderkey: rfoh06y8w3amg,
name: Test 101,
description: ,
created: 2015-05-11 13:13:17,
created_utc: 2015-05-11T18:13:17Z,
privacy: public,
file_count: 0,
folder_count: 0,
revision: 162727,
dropbox_enabled: no,
flag: 2,
upload_key: ba860a9208913ce508d8a638a7d1bbf7cf3f8198e07a7426ce9353ceb18462a4,
folder_key: ih5qo0ia9lhsy,
result: Success,
new_key: yes,
current_api_version: 1.5,
new_device_revision: 162727,
}
Example 2 (Success with XML - parent_path, action_on_duplicate=skip, folder exists, by name, in destination):
HTTPS://www.mediafire.com/api/1.5/folder/create.php?session_token=&foldername=Test%20101&parent_path=Stay%2FTest%20001&action_on_duplicate=skip&response_format=xml&signature=
<action>folder/create</action>
<result>Success</result>
<new_key>yes</new_key>
<current_api_version>1.5</current_api_version>
Example 3 (Success with JSON - parent_path and action_on_duplicate=keep and folder exists, by name, in destination):
HTTPS://www.mediafire.com/api/1.5/folder/create.php?session_token=&foldername=Test%20101&parent_path=Stay%2FTest%20001&action_on_duplicate=keep&response_format=json&signature=
{
action: folder/create,
parent_folderkey: rfoh06y8w3amg,
name: Test 101(2),
description: ,
created: 2015-05-11 13:17:53,
created_utc: 2015-05-11T18:17:53Z,
privacy: public,
file_count: 0,
folder_count: 0,
revision: 162728,
dropbox_enabled: no,
flag: 2,
upload_key: ba860a9208913ce508d8a638a7d1bbf7f08d1935ea6a12596c85d6b625a9f36f,
folder_key: 1fprh0r43doqa,
result: Success,
new_key: yes,
current_api_version: 1.5,
new_device_revision: 162728,
}
Example 4 (Success with XML - parent_key not owned by session user and having edit permissions and action_on_duplicate=replace and folder exists, by name, in destination):
HTTPS://www.mediafire.com/api/1.5/folder/create.php?session_token=&foldername=Test%20001&parent_key=jaebr616cg651&action_on_duplicate=replace&response_format=xml&signature=
<action>folder/create</action>
<folder_key>6pl8a04v9l77x</folder_key>
<name>Test 001</name>
<upload_key>d0579f144b57b81bd8f14848abf485ddf08d1935ea6a1259f4bf71cd10d47365</upload_key>
<created>2015-05-11 13:19:12</created>
<created_utc>2015-05-11T18:19:12Z</created_utc>
<privacy>private</privacy>
<result>Success</result>
<new_key>yes</new_key>
<current_api_version>1.5</current_api_version>
HTTPS://www.mediafire.com/api/1.5/folder/create.php?session_token=&foldername=Test%20001&action_on_duplicate=skip&response_format=xml&signature=
<action>folder/create</action>
<result>Success</result>
<new_key>yes</new_key>
<current_api_version>1.5</current_api_version>
Delete
Description: Deletes one or more session user's folders by setting the folders' and their contents' delete_date properties and moving the folders and their contents to the trash can. The folder is not deleted permanently but, rather, the folder is moved to the trash can.
Required Parameters:
- session_token : A type 1 or type 2 session token. (Type 2 will require a call signature).
Relative Parameters:
- folder_key : The key that identifies the folder to be deleted. You can also specify multiple folderkeys separated by commas. Required if folder_path is not passed. Takes precedence over folder_path.
- folder_path : The absolute path to a single folder in the session user's account. Required if folder_key is not passed.
- signature : Required only for session token version 2. Click here to learn more about building an API call signature.
Optional Parameters:
- response_format : 'xml' or 'json' (default 'xml')
Response Properties
Name | Description | Type | Value |
---|---|---|---|
asynchronous | Specifies whether the restore is being processed asynchronously. If yes, poll device/get_status to determine when the job is complete | flag | yes/no |
new_folderkey | The new folderkey | string | |
error | The numerical error code | integer | 114, 259 |
message | The error description for the error | string | |
deprecated | Indicates this API is deprecated and should no longer be used | string | |
new_device_revision | The revision number of the device. Returned only when the revision number has changed. | integer | |
result | Indicates if the API call was successful. 'Error' or "Success' | string |
Error Codes
To view a list of possible error codes for this API, and their descriptions, click here.
Examples:
Example 1 (Success with JSON - folder_path):
HTTPS://www.mediafire.com/api/1.5/folder/delete.php?session_token=&folder_path=Stay%2FTest%20001%2FTest%20101&response_format=json&signature=
{
action: folder/delete,
asynchronous: no,
result: Success,
new_key: yes,
current_api_version: 1.5,
new_device_revision: 162729,
}
Example 2 (Success with XML - folder_key not owned by session user and having edit permissions):
HTTPS://www.mediafire.com/api/1.5/folder/delete.php?session_token=&folder_key=6pl8a04v9l77x&response_format=xml&signature=
<action>folder/delete</action>
<asynchronous>no</asynchronous>
<result>Success</result>
<new_key>yes</new_key>
<current_api_version>1.5</current_api_version>
<new_device_revision>1177</new_device_revision>
Example 3 (Failure with XML - Error 114 with folder_key not owned by session user and lacking edit permissions):
HTTPS://www.mediafire.com/api/1.5/folder/delete.php?session_token=&folder_key=ll19p52lfxqoe&response_format=xml&signature=
<action>folder/delete</action>
<message>Access denied</message>
<error>114</error>
<result>Error</result>
<new_key>yes</new_key>
<current_api_version>1.5</current_api_version>
Get Content
Notes: New response property revision for target folder.
Description: Returns a collection of top-level folders or files for target folder.
Required Parameters:
- none
Relative Parameters:
- folder_key : A folder key. If folder_key and folder_path are not passed, device 0's(cloud) root is used. Required if session_token and folder_path are not passed. Takes precedence over folder_path. myfiles may be passed as a moniker for device 0's(cloud) root.
- folder_path : The absolute path to a single folder in the session user's account. Required if folder_key is not passed.
- session_token : A type 1 or type 2 session token. (Type 2 will require a call signature).
- signature : Required only for session token version 2. Click here to learn more about building an API call signature.
Optional Parameters:
- content_type : Specifies the type of content to return. folders(default) or files.
- filter : Filter by privacy and/or by filetype. This is a comma-separated list of file types and privacy options and can take one or more of the following values : "public", "private", "image", "video", "audio", "document", "spreadsheet", "presentation", "application", "archive", "data", and "development". If content_type is 'folders', only 'public' and 'private' filters are honored.
- device_id : An integer specifying on which user device to look for data. If not passed, device 0's(cloud) is used.
- order_by : 'name', 'created', 'size', 'downloads' (default 'name'). In case of requesting folders, only 'name' and 'created' are considered; anything else will default to 'name'.
- order_direction : Specifies the sort order of the results. asc(default) or desc.
- chunk : Specifies which segment of the results to return starting from 1. Repeat calls to this API, incrementing chunk on each call, to obtain all the result data.
- chunk_size: The number of items to include in each chunk returned. Range: 100 to 1000. Default: 100.
- details : Specifies additional folder information to return in the results. If content_type=files this parameter is ignored. folder_count and file_count are always returned and represent the count of folders and files, non-recursive, inside a folder. details=yes adds total_files, total_folders, and total_size to the results which represent the counts of all the folders and files, recursive, inside a folder. There is a limit on how many items will be recursively counted and, when reached, an extra property, overflow, will be returned. details=shallow adds byte_count to the results which represents the total bytes of all files, non-recursive, in a folder. no(default), yes or shallow.
- response_format : 'xml' or 'json' (default 'xml')
Response Properties
Name | Description | Type | Value |
---|---|---|---|
chunk_size | The number of items returned in a single chunk. | ||
content_type | The type of content requested | string | folders/files |
chunk_number | The chunk number | ||
more_chunks | Indicates whether more chunks are available: 'yes' or 'no' | yes, no flag | |
error | The numerical error code | integer | 114 |
message | The error description for the error | string | |
deprecated | Indicates this API is deprecated and should no longer be used | string | |
new_device_revision | The revision number of the device. Returned only when the revision number has changed. | integer | |
result | Indicates if the API call was successful. 'Error' or "Success' | string | |
new_key | Indicates a new call signature needs calculated. Applicable only when using Session Token v2 | yes, no flag | |
current_api_version | The latest stable API version number | string |
Response for Files Contained Within Folder
Name | Description | Type | Value |
---|---|---|---|
quickkey | The quickey of the file inside the requested folder | ||
hash | The hash of the file | ||
filename | The file name | ||
description | The file description | ||
size | The file size | ||
privacy | The privacy of the file. 'public' or 'private' | ||
created | The date the file was created | ||
password_protected | Indicates if the file is password protected: 'yes' or 'no' [DEPRECATED] | flag | yes, no |
mimetype | The mimetype of the file | ||
filetype | The file type | application, archive, audio, development, data, document, image, presentation, spreadsheet, video | |
view | Specifies if this file is viewable via MediaFire and, if so, by what system. 0 [not-viewable], 1 [PDF Viewer], 2 [PDF Viewer], 3 [deprecated]. | 0(Not Viewable, 1(PDF2HTMLex), 2(Syntax Highlighting), 3(PHP Excel), 4(AbiWord), 5(PDF2HTMLex with GS PDF Split), 6(PlainText), 7(Image Gallery), 9(JPlayer Audio), 10(JPlayer Audio with Transcode), 11(JPlayer Video), 12(JPlayer Video with Transcode) | |
edit | Specifies if this file can be edited via MediaFire and, if so, by what system. 0 [not-editable], 1 [Text Editor], 2 [deprecated]. | ||
revision | The file revision | ||
flag | Information about the file | bitmask | 1(File is owned by the session user), 2:(File is supported for preview), 4(File is editable) 8(File is virus flagged) |
permissions | An array of permission objects | object [] | |
permissions --> value | The specific permission level the user has to the folder | integer | 1(read), 2(read+write), 4(manage)[NOT IN USE] |
permissions --> explicit | Specifies whether the folder owner granted the permission | flag | yes, no |
permissions --> read | Specifies whether the user has read access to the folder | flag | yes, no |
permissions --> write | Specifies whether the user has write access to the folder | flag | yes, no |
downloads | The amount of times the file has been downloaded | ||
views | The amount of times the file has been viewed |
Link Information
Name | Description | Type | Value |
---|---|---|---|
view | The view link of the file (if applicable) | ||
read | The read only link of the file (if applicable) | ||
edit | The edit link of the file (if applicable) | ||
watch | A link to watch the file (if video) | ||
listen | A link to listen to the file (if audio) | ||
normal_download | The normal download link of the file | ||
direct_download | The direct download link of the file | ||
streaming | The streaming link of the file (if applicable) | ||
download | The download link of the file |
One-time Link Information
Name | Description | Type | Value |
---|---|---|---|
download | A one-time link to download the file | ||
view | A one-time link to view the file (if applicable) | ||
watch | A one-time link to watch the file (if video) | ||
listen | A one-time link to listen to the file (if audio) |
Response for a Folder Contained Within the Folder
Name | Description | Type | Value |
---|---|---|---|
folderkey | The folderkey of the folder | string | |
name | The name of the folder | string | |
description | The description of the folder | string | |
privacy | The security setting for the folder | string | private/public |
created | The date and time the folder was created | string timestamp | |
revision | The revision number of the folder | integer | |
file_count | The amount of files within the folder | integer | |
folder_count | The amount of folders within the folder | integer | |
dropbox_enabled | Indicates if the folder is FileDrop enabled | flag | yes, no |
flag | The bitmask value specifying special details about a file | bitmask | '1' = File is owned by the session user |
Error Codes
To view a list of possible error codes for this API, and their descriptions, click here.
Examples:
Example 1 (Success with JSON - folder_path, content_type=folders, and details=no):
HTTPS://www.mediafire.com/api/1.5/folder/get_content.php?session_token=&folder_path=Stay%2FTest%20001&content_type=folders&filter=all&order_by=created&order_direction=asc&details=no&response_format=json&signature=
{
action: folder/get_content,
asynchronous: no,
folder_content:{
chunk_size: 100,
content_type: folders,
chunk_number: 1,
folders:[
{
folderkey: 21a1ht4gm4144,
name: Photos,
description: ,
privacy: public,
created: 2015-05-11 12:49:02,
revision: 162726,
flag: 2,
file_count: 12,
folder_count: 1,
dropbox_enabled: no,
created_utc: 2015-05-11T17:49:02Z,
}
{
folderkey: 1fprh0r43doqa,
name: Test 101(2),
description: ,
privacy: public,
created: 2015-05-11 13:17:53,
revision: 162728,
flag: 2,
file_count: 5,
folder_count: 1,
dropbox_enabled: no,
created_utc: 2015-05-11T18:17:53Z,
}
]
more_chunks: no,
}
result: Success,
new_key: yes,
current_api_version: 1.5,
}
Example 2 (Success with XML - folder_key, content_type=folders, and details=yes):
HTTPS://www.mediafire.com/api/1.2/folder/get_content.php?session_token=&folder_key=2ynmtp05gd8p2&content_type=folders&filter=all&order_by=created&order_direction=asc&details=yes&response_format=xml&signature=
<action>folder/get_content</action>
<asynchronous>no</asynchronous>
<folder_content>
<chunk_size>100</chunk_size>
<content_type>folders</content_type>
<chunk_number>1</chunk_number>
<folders>
<folder>
<folderkey>n3erva9t9rn36</folderkey>
<name>Test 002-001</name>
<description></description>
<privacy>private</privacy>
<created>2015-04-29 13:57:24</created>
<revision>161604</revision>
<flag>2</flag>
<file_count>7</file_count>
<folder_count>1</folder_count>
<dropbox_enabled>no</dropbox_enabled>
<total_folders>0</total_folders>
<total_files>2</total_files>
<total_size>7763</total_size>
</folder>
<folder>
<folderkey>t240hiidaa4le</folderkey>
<name>Test 002-002</name>
<description></description>
<privacy>private</privacy>
<created>2015-04-29 13:57:30</created>
<revision>161605</revision>
<flag>2</flag>
<file_count>8</file_count>
<folder_count>1</folder_count>
<dropbox_enabled>no</dropbox_enabled>
<total_folders>0</total_folders>
<total_files>3</total_files>
<total_size>3522583</total_size>
</folder>
</folders>
<more_chunks>no</more_chunks>
</folder_content>
<result>Success</result>
<new_key>yes</new_key>
<current_api_version>1.5</current_api_version>
Example 3 (Success with JSON - folder_path, content_type=folders, and details=shallow):
HTTPS://www.mediafire.com/api/1.5/folder/get_content.php?session_token=&folder_path=stay%2Ftest%20001&content_type=folders&filter=all&order_by=created&order_direction=asc&details=shallow&response_format=json&signature=
{
action: folder/get_content,
asynchronous: no,
folder_content:{
chunk_size: 100,
content_type: folders,
chunk_number: 1,
folders:[
{
folderkey: 21a1ht4gm4144,
name: Photos,
description: ,
privacy: public,
created: 2015-05-11 12:49:02,
revision: 162726,
flag: 2,
file_count: 12,
folder_count: 1,
dropbox_enabled: no,
byte_count: 36824767,
created_utc: 2015-05-11T17:49:02Z,
}
{
folderkey: 1fprh0r43doqa,
name: Test 101(2),
description: ,
privacy: public,
created: 2015-05-11 13:17:53,
revision: 162728,
flag: 2,
file_count: 5,
folder_count: 1,
dropbox_enabled: no,
byte_count: ,
created_utc: 2015-05-11T18:17:53Z,
}
]
more_chunks: no,
}
result: Success,
new_key: yes,
current_api_version: 1.5,
}
Example 4 (Success with XML - folder_key not owned by but shared to session user and content_type=files):
HTTPS://www.mediafire.com/api/1.5/folder/get_content.php?session_token=&folder_key=jaebr616cg651&content_type=files&filter=all&order_by=created&order_direction=asc&response_format=xml&signature=
<action>folder/get_content</action>
<asynchronous>no</asynchronous>
<folder_content>
<chunk_size>100</chunk_size>
<content_type>files</content_type>
<chunk_number>1</chunk_number>
<files>
<file>
<quickkey>98dc3nr8e2d3hdp</quickkey>
<hash>fadbaec0558fd534f65bf2fbcf85eb6b6a8bdba5b33b07ba3290363cc6ff46cd</hash>
<filename>Getting Started with Images.pdf</filename>
<description></description>
<size>11721254</size>
<privacy>public</privacy>
<created>2014-09-16 15:00:47</created>
<password_protected>no</password_protected>
<mimetype>application/pdf</mimetype>
<filetype>document</filetype>
<view>1</view>
<edit>0</edit>
<revision>1173</revision>
<flag>4</flag>
<permissions>
<value>2</value>
<explicit>0</explicit>
<read>1</read>
<write>1</write>
</permissions>
<downloads>0</downloads>
<views>0</views>
<links>
<view>http://www.mediafire.com/view/98dc3nr8e2d3hdp/Getting_Started_with_Images.pdf</view>
<read>http://www.mediafire.com/view/98dc3nr8e2d3hdp/Getting_Started_with_Images.pdf</read>
<normal_download>http://www.mediafire.com/file/98dc3nr8e2d3hdp/Getting_Started_with_Images.pdf</normal_download>
<direct_download>http://download844.mediafire.com/9lf7gk85qvkg/98dc3nr8e2d3hdp/GettingStartedwithImages.pdf</direct_download>
<one_time>
<download>http://www.mediafire.com/?l9912prougc2flgejdn5mt2a6ncv58m</download>
<view>http://www.mediafire.com/view/l9912prougc2flgejdn5mt2a6ncv58m</view>
</one_time>
</links>
<created_utc>2014-09-16T20:00:47Z</created_utc>
</file>
<file>
<quickkey>qy3l3974ey2w70t</quickkey>
<hash>dd3ed817fe291bd2f6482e3aec0cce2f573e8d41bd548a26910121b6c680b4b7</hash>
<filename>Sample - Koh Ngai.jpg</filename>
<description>Koh Ngai Explored by Darren Johnson http://www.flickr.com/photos/dazjohnson/7424536244/</description>
<size>7246983</size>
<privacy>public</privacy>
<created>2014-09-16 15:00:47</created>
<password_protected>no</password_protected>
<mimetype>image/jpeg</mimetype>
<filetype>image</filetype>
<view>2</view>
<edit>0</edit>
<revision>1173</revision>
<flag>4</flag>
<permissions>
<value>2</value>
<explicit>0</explicit>
<read>1</read>
<write>1</write>
</permissions>
<downloads>0</downloads>
<views>0</views>
<links>
<view>http://www.mediafire.com/view/qy3l3974ey2w70t/Sample_-_Koh_Ngai.jpg</view>
<read>http://www.mediafire.com/view/qy3l3974ey2w70t/Sample_-_Koh_Ngai.jpg</read>
<normal_download>http://www.mediafire.com/file/qy3l3974ey2w70t/Sample_-_Koh_Ngai.jpg</normal_download>
<direct_download>http://download1334.mediafire.com/el4609heof4g/qy3l3974ey2w70t/Sample-KohNgai.jpg</direct_download>
<one_time>
<download>http://www.mediafire.com/?v453z8wall46ja2tlu4jpcakdakdw5t</download>
<view>http://www.mediafire.com/view/v453z8wall46ja2tlu4jpcakdakdw5t</view>
</one_time>
</links>
<created_utc>2014-09-16T20:00:47Z</created_utc>
</file>
</files>
<more_chunks>no</more_chunks>
</folder_content>
<result>Success</result>
<new_key>yes</new_key>
<current_api_version>1.5</current_api_version>
Example 5 (Success with JSON - content_type=files and public folder_key not owned by or shared to session user with one public file not shared to session user):
HTTPS://www.mediafire.com/api/1.5/folder/get_content.php?session_token=&folder_key=zoppn89frkah9&content_type=files&filter=all&order_by=created&order_direction=asc&response_format=json&signature=
{
action: folder/get_content,
asynchronous: no,
folder_content:{
chunk_size: 100,
content_type: files,
chunk_number: 1,
files:[
{
quickkey: ppdbpa58mq0lhym,
hash: b50a655b35c02eaf5683c255d8f6e938b783e164c7b227ce397639ecdc221093,
filename: Sample - The M Machine - Tiny Anthem.mp4,
description: ,
size: 36431235,
privacy: public,
created: 2014-09-16 15:00:48,
password_protected: no,
mimetype: video/mp4,
filetype: video,
view: 5,
edit: 0,
revision: 1133,
flag: 4,
links:{
watch: http://www.mediafire.com/watch/ppdbpa58mq0lhym/Sample_-_The_M_Machine_-_Tiny_Anthem.mp4,
normal_download: http://www.mediafire.com/file/ppdbpa58mq0lhym/Sample_-_The_M_Machine_-_Tiny_Anthem.mp4,
}
created_utc: 2014-09-16T20:00:48Z,
}
]
more_chunks: no,
}
result: Success,
new_key: yes,
current_api_version: 1.5,
}
Example 6 (Failure with XML - Error 114 private folder_key not owned by or shared to session user):
HTTPS://www.mediafire.com/api/1.5/folder/get_content.php?session_token=&folder_key=854vy14gg1vi9&content_type=folders&filter=all&order_by=created&order_direction=asc&response_format=xml&signature=
<action>folder/get_content</action>
<message>Access denied</message>
<error>114</error>
<result>Error</result>
<new_key>yes</new_key>
<current_api_version>1.5</current_api_version>
Get Depth
Description: Specifies how deep in the folder structure, how far from root, the target folder is. The number of levels deep is returned with a list of "chain folders" which illustrate the direct path from root to the target folder.
Required Parameters:
- session_token : A type 1 or type 2 session token. (Type 2 will require a call signature).
- folder_key : The key that identifies the folder to be deleted. You can also specify multiple folderkeys separated by commas. Required if folder_path is not passed. Takes precedence over folder_path.
- folder_path : The absolute path to a single folder in the session user's account. Required if folder_key is not passed.
Relative Parameters:
- signature : Required only for session token version 2. Click here to learn more about building an API call signature.
Optional Parameters:
- response_format : 'xml' or 'json' (default 'xml')
Response Properties
Name | Description | Type | Value |
---|---|---|---|
folderkey | The folderkey for the newly created folder | string | |
name | The name of the newly created folder | string | |
depth | The numerical distance of the specified folder from the root folder | integer | |
chain_folders | A collection of folders, starting with the specified folder, linking back to root | object | |
error | The numerical error code | integer | 259 |
message | The error description for the error | string | |
deprecated | Indicates this API is deprecated and should no longer be used | string | |
result | Indicates if the API call was successful. 'Error' or "Success' | string | |
new_key | Indicates a new call signature needs calculated. Applicable only when using Session Token v2 | yes/no flag | |
current_api_version | The latest stable API version number | string |
Error Codes
To view a list of possible error codes for this API, and their descriptions, click here.
Examples:
Example 1 (Success with JSON - folder_path):
HTTPS://www.mediafire.com/api/1.5/folder/get_depth.php?session_token=&folder_path=stay%2Ftest%20001%2Ftest%20101(2)&response_format=json&signature=
{
action: folder/get_depth,
folder_depth:{
depth: 3,
chain_folders:[
{
folderkey: 1fprh0r43doqa,
name: Test 101(2),
}
{
folderkey: rfoh06y8w3amg,
name: Test 001,
}
{
folderkey: dwr4tgrn9vsd0,
name: Stay,
}
]
}
result: Success,
new_key: yes,
current_api_version: 1.5,
}
Example 2 (Success with XML - public folder_key not owned by or shared to session user):
HTTPS://www.mediafire.com/api/1.5/folder/get_depth.php?session_token=&folder_key=adhh9bywxj7b4&response_format=xml&signature=
<action>folder/get_depth</action>
<folder_depth>
<depth>2</depth>
<chain_folders>
<chain_folder>
<folderkey>adhh9bywxj7b4</folderkey>
<name>Test 001</name>
</chain_folder>
<chain_folder>
<folderkey>zoppn89frkah9</folderkey>
<name>Videos</name>
</chain_folder>
</chain_folders>
</folder_depth>
<result>Success</result>
<new_key>yes</new_key>
<current_api_version>1.5</current_api_version>
Get Info
Description : Returns a list of a folder's details.
Required Parameters:
- none
Relative Parameters:
- folder_key : A comma-separated list of folder keys. If folder_key and folder_path are not passed, device 0's(cloud) root is used. Required if session_token and folder_path are not passed. myfiles may be passed as a moniker for device 0's(cloud) root.
- folder_path : The absolute path to a single folder in the session user's account. Required if folder_key is not passed.
- session_token : A type 1 or type 2 session token. (Type 2 will require a call signature).
- signature : Required only for session token version 2. Click here to learn more about building an API call signature.
Optional Parameters:
- device_id : An integer specifying on which user device to look for data. If not passed, device 0(cloud) is used.
- details : Specifies additional folder information to return in the results. If content_type=files this parameter is ignored. folder_count and file_count are always returned and represent the counts of folders and files, non-recursive, inside a folder. details=yes adds total_files, total_folders, and total_size to the results which represent the counts of all the folders and files, recursive, inside a folder. There is a limit on how many items will be recursively counted and, when reached, an extra property, overflow, will be returned. details=shallow adds byte_count to the results which represents the total bytes of all files, non-recursive, in a folder. no(default), yes or shallow.
- response_format : 'xml' or 'json' (default 'xml')
Response Properties
Name | Description | Type | Value |
---|---|---|---|
result | Indicates if the API call was successful. 'Error' or 'Success' | string | |
new_key | Indicates a new call signature needs calculated. Applicable only when using Session Token v2 | flag | yes/no |
current_api_version | The latest stable API version number | string | |
folderkey | The folderkey | string | |
parent_folderkey | The ID key of the folder containing this folder. Not returned when the parent folder is device 0's(cloud) root | string | |
name | The name of the folder | string | |
description | The folder description | string | |
created | The date and time the folder was created | string timestamp | |
tag | deprecated | string | |
privacy | The security of the file. 'public' or 'private' | string | public, private |
file_count | The amount of files contained in the folder | integer | |
folder_count | The amount of folders in the folder | integer | |
total_files | The total amount of files contained within the folder and subfolders | integer | |
total_folders | The total amount of folders contained within the folder and subfolders | integer | |
total_size | The total folder size in bytes | integer | |
byte_count | The size of the folder incorporating only immediate content files | integer | |
revision | The revision number of the folder | integer | |
dropbox_enabled | Indicated whether the folder is a FileDrop. 'yes' or 'no' | flag | yes/no |
flag | A bit-mask value specifying special details about the folder or file | bitmask | 1 (File is owned by the session user), 2 (File is supported for preview), 4 (File is editable), 8 (File is virus flagged) [Flags not listed are for internal MediaFire operations and not public use] |
owner_name | The owner of the folder | string | |
avatar | The location of the avatar associated with the account | string | |
shared_by_user | Specifies whether the folder's owner has shared it to a contact | string | 0 (no), 1 (yes) |
permissions | An array of permission objects | object [] | |
permissions --> value | The specific permission level the user has to the folder | integer | 1(read), 2(read+write), 4(manage)[NOT IN USE] |
permissions --> explicit | Specifies whether the folder owner granted the permission | flag | yes, no |
permissions --> read | Specifies whether the user has read access to the folder | flag | yes, no |
permissions --> write | Specifies whether the user has write access to the folder | flag | yes, no |
delete_date | The date and time the file was moved to the Trash (if applicable). | string timestamp | |
error | The numerical error code | integer | 114 |
message | The error description for the error | string | |
deprecated | Indicates this API is deprecated and should no longer be used | string | |
result | Indicates if the API call was successful. 'Error' or "Success' | string | |
new_key | Indicates a new call signature needs calculated. Applicable only when using Session Token v2 | yes/no flag | |
current_api_version | The latest stable API version number | string |
Error Codes
To view a list of possible error codes for this API, and their descriptions, click here.
Examples:
Example 1 (Success with JSON - folder_path & details=no):
HTTPS://www.mediafire.com/api/1.5/folder/get_info.php?session_token=&folder_path=Test%20002%2FTest%20001&details=no&response_format=json&signature=
{
action: folder/get_info,
folder_info:{
folderkey: djwm42qh425ze,
parent_folderkey: b5brfb1s16fr0,
name: Test 001,
description: ,
created: 2015-04-28 16:29:05,
privacy: public,
file_count: 1,
folder_count: 0,
revision: 162725,
owner_name: Clint,
avatar: https://www7.mediafire.com/convkey/6171/2jtoxlf0jo7nsri1g.jpg,
dropbox_enabled: no,
flag: 2,
created_utc: 2015-04-28T21:29:05Z,
}
result: Success,
new_key: yes,
current_api_version: 1.5,
}
Example 3 (Success with XML - folder_path & details=yes):
HTTPS://www.mediafire.com/api/1.5/folder/get_info.php?session_token=&folder_path=Test%20002%2FTest%20001&details=yes&response_format=xml&signature=
<action>folder/get_info</action>
<folder_info>
<folderkey>djwm42qh425ze</folderkey>
<parent_folderkey>b5brfb1s16fr0</parent_folderkey>
<name>Test 001</name>
<description></description>
<created>2015-04-28 16:29:05</created>
<privacy>public</privacy>
<file_count>1</file_count>
<folder_count>0</folder_count>
<total_files>1</total_files>
<total_folders>0</total_folders>
<total_size>2</total_size>
<revision>162725</revision>
<owner_name>Clint</owner_name>
<avatar>https://www7.mediafire.com/convkey/6171/2jtoxlf0jo7nsri1g.jpg</avatar>
<dropbox_enabled>no</dropbox_enabled>
<flag>2</flag>
<created_utc>2015-04-28T21:29:05Z</created_utc>
</folder_info>
<result>Success</result>
<new_key>yes</new_key>
<current_api_version>1.5</current_api_version>
Example 4 (Success with JSON - folder_path & details=shallow):
HTTPS://www.mediafire.com/api/1.5/folder/get_info.php?session_token=&folder_path=Test%20002%2FTest%20001&details=shallow&response_format=json&signature=
{
action: folder/get_info,
folder_info:{
folderkey: djwm42qh425ze,
parent_folderkey: b5brfb1s16fr0,
name: Test 001,
description: ,
created: 2015-04-28 16:29:05,
privacy: public,
file_count: 1,
folder_count: 0,
byte_count: 2,
revision: 162725,
owner_name: Clint,
avatar: https://www7.mediafire.com/convkey/6171/2jtoxlf0jo7nsri1g.jpg,
dropbox_enabled: no,
flag: 2,
created_utc: 2015-04-28T21:29:05Z,
}
result: Success,
new_key: yes,
current_api_version: 1.5,
}
Example 5 (Success with XML - public folder_key not owned by session user and details=no):
HTTPS://www.mediafire.com/api/1.5/folder/get_info.php?session_token=&folder_key=zoppn89frkah9&details=no&response_format=xml&signature=
<action>folder/get_info</action>
<folder_info>
<folderkey>zoppn89frkah9</folderkey>
<name>Videos</name>
<description></description>
<created>2014-09-16 15:00:47</created>
<privacy>public</privacy>
<file_count>2</file_count>
<folder_count>1</folder_count>
<revision>1158</revision>
<owner_name>Test 03</owner_name>
<avatar>https://www.mediafire.com/images/icons/myfiles/default.png</avatar>
<flag>0</flag>
<created_utc>2014-09-16T20:00:47Z</created_utc>
</folder_info>
<result>Success</result>
<new_key>yes</new_key>
<current_api_version>1.5</current_api_version>
Example 6 (Success with JSON - public folder_key not owned by session user and details=yes):
HTTPS://www.mediafire.com/api/1.5/folder/get_info.php?session_token=&folder_key=jaebr616cg651&details=yes&response_format=json&signature=
{
action: folder/get_info,
folder_info:{
folderkey: jaebr616cg651,
name: Photos,
description: ,
created: 2014-09-16 15:00:47,
privacy: public,
file_count: 7,
folder_count: 0,
total_files: 7,
total_folders: 0,
total_size: 36824767,
revision: 1177,
owner_name: Test 03,
avatar: https://www.mediafire.com/images/icons/myfiles/default.png,
flag: 0,
permissions:{
value: 2,
explicit: 1,
read: 1,
write: 1,
}
created_utc: 2014-09-16T20:00:47Z,
}
result: Success,
new_key: yes,
current_api_version: 1.5,
}
Example 7 (Success with JSON - public folder_key not owned by session user and session user has edit permissions and details=shallow):
HTTPS://www.mediafire.com/api/1.5/folder/get_info.php?session_token=&folder_key=8qkxzxu31sqe5&details=shallow&response_format=xml&signature=
<action>folder/get_info</action>
<folder_info>
<folderkey>8qkxzxu31sqe5</folderkey>
<name>Music</name>
<description></description>
<created>2014-09-16 15:00:47</created>
<privacy>private</privacy>
<file_count>5</file_count>
<folder_count>0</folder_count>
<byte_count>42314652</byte_count>
<revision>1180</revision>
<owner_name>Test 03</owner_name>
<avatar>https://www.mediafire.com/images/icons/myfiles/default.png</avatar>
<flag>0</flag>
<permissions>
<value>1</value>
<explicit>1</explicit>
<read>1</read>
<write>0</write>
</permissions>
<created_utc>2014-09-16T20:00:47Z</created_utc>
</folder_info>
<result>Success</result>
<new_key>yes</new_key>
<current_api_version>1.5</current_api_version>
Example 8 (Failure with JSON - Error 114 with private folder_key not owned by or shared to session user):
HTTPS://www.mediafire.com/api/1.5/folder/get_info.php?session_token=&folder_key=sasvmjen9mxhe&details=shallow&response_format=json&signature=
{
action: folder/get_info,
message: Access denied,
error: 114,
result: Error,
new_key: yes,
current_api_version: 1.5,
}
Get Siblings
Description : Returns a collection of folders that are siblings of the target folder. Only public siblings are returned when the target folder is not owned by the session user.
Required Parameters:
- none
Relative Parameters:
- folder_key : The key that identifies the folder to be deleted. You can also specify multiple folderkeys separated by commas. Required if folder_path is not passed. Takes precedence over folder_path.
- folder_path : The absolute path to a single folder in the session user's account. Required if folder_key is not passed.
- session_token : A type 1 or type 2 session token. (Type 2 will require a call signature).
- signature : Required only for session token version 2. Click here to learn more about building an API call signature.
Optional Parameters:
- start : Request to return results or a subset of the siblings starting from this number.
- limit : The maximum results to be returned.
- response_format : 'xml' or 'json' (default 'xml')
Response Properties
Name | Description | Type | Value |
---|---|---|---|
error | The numerical error code | integer | 112, 114, 259 |
message | The error description for the error | string | |
deprecated | Indicates this API is deprecated and should no longer be used | string | |
result | Indicates if the API call was successful. 'Error' or "Success' | string | |
new_key | Indicates a new call signature needs calculated. Applicable only when using Session Token v2 | yes/no flag | |
current_api_version | The latest stable API version number | string |
Sibling Folder Responses
Name | Description | Type | Value |
---|---|---|---|
folderkey | The folderkey | string | |
name | The folder name | string | |
description | The folder description | string | |
created | The date and time the folder was created | string timestamp | |
privacy | Indicates the folder's privacy | string | public/private |
file_count | The amount of files contained in the folder | integer | |
folder_count | The amount of folders contained in the folder | integer | |
revision | The folder revision | integer | |
owner_name | The folder owner's name | string> | |
avatar | The location of the folder's avatar | string | |
dropbox_enabled | Indicates if the folder is a FileDrop: 'yes' or 'no' | yes/no flag | |
flag | A bit-mask value specifying special details about the folder or file | bitmask | 1 (File is owned by the session user), 2 (File is supported for preview), 4 (File is editable), 8 (File is virus flagged) [Flags not listed are for internal MediaFire operations and not public use] |
Error Codes
To view a list of possible error codes for this API, and their descriptions, click here.
Examples:
Example 1 (Success with JSON - folder_path):
HTTPS://www.mediafire.com/api/1.5/folder/get_siblings.php?folder_path=Images&session_token=&response_format=json&signature=
{
action: folder/get_siblings,
siblings:[
{
folderkey: dwr4tgrn9vsd0,
name: Stay,
description: ,
created: 2015-04-29 13:33:53,
privacy: public,
file_count: 7,
folder_count: 1,
revision: 162730,
owner_name: Clint,
avatar: https://www7.mediafire.com/convkey/6171/2jtoxlf0jo7nsri1g.jpg,
dropbox_enabled: no,
flag: 2,
created_utc: 2015-04-29T18:33:53Z,
}
{
folderkey: b5brfb1s16fr0,
name: Test 002,
description: ,
created: 2015-05-06 15:09:30,
privacy: public,
file_count: 8,
folder_count: 1,
revision: 162725,
owner_name: Clint,
avatar: https://www7.mediafire.com/convkey/6171/2jtoxlf0jo7nsri1g.jpg,
dropbox_enabled: yes,
flag: 2,
created_utc: 2015-05-06T20:09:30Z,
}
]
result: Success,
new_key: yes,
current_api_version: 1.5,
}
Example 2 (Success with XML - public folder_key not owned by session user):
HTTPS://www.mediafire.com/api/1.0/folder/get_siblings.php?&folder_key=mfncvwuarcwr9&session_token=&response_format=xml&signature=
<action>folder/get_siblings</action>
<siblings>
<sibling>
<folderkey>854vy14gg1vi9</folderkey>
<name>Test 003</name>
<description></description>
<created>2015-04-08 18:41:49</created>
<privacy>public</privacy>
<file_count>0</file_count>
<folder_count>0</folder_count>
<revision>1089</revision>
<owner_name>Test 03</owner_name>
<avatar>https://www.mediafire.com/images/icons/myfiles/default.png</avatar>
<flag>0</flag>
</sibling>
</siblings>
<result>Success</result>
<new_key>yes</new_key>
<current_api_version>1.5</current_api_version>
Example 3 (Failure with JSON - Error 114 with private folder_key not owned by session user):
HTTPS://www.mediafire.com/api/1.0/folder/get_siblings.php?&folder_key=jaebr616cg651&session_token=&response_format=json&signature=
{
action: folder/get_siblings,
message: Access denied,
error: 114,
result: Error,
new_key: yes,
current_api_version: 1.5,
}
Move
Description : Move one or more user's folders to target destination.
Required Parameters:
- session_token : A type 1 or type 2 session token. (Type 2 will require a call signature).
Relative Parameters:
- signature : Required only for session token version 2. Click here to learn more about building an API call signature.
- folder_key_src : The folderkey source is the folderkey of the desired folder you wish to copy. You can also specify multiple folderkeys separated by commas. folder_path_src is not passed. Takes precedence over folder_path_src.
- folder_path_src : The absolute path to a single folder in the session user's account. Required if folder_key_src is not passed.
Optional Parameters:
- folder_key_dst : The destination folderkey. If folder_key_dst and folder_path_dst are not passed, device 0's(cloud) root is used. Takes precedence over folder_path_dst. myfiles may be passed as a moniker for device 0's(cloud) root.
- folder_path_dst : The absolute path to a single folder in the session user's account. If folder_key_dst and folder_path_dst are not passed, device 0's(cloud) root is used.
- response_format : 'xml' or 'json' (default 'xml')
Response Properties
Name | Description | Type | Value |
---|---|---|---|
error | The numerical error code | integer | |
message | The error description for the error | string | |
deprecated | Indicates this API is deprecated and should no longer be used | string | |
new_device_revision | The revision number of the device. Returned only when the revision number has changed. | integer | |
result | Indicates if the API call was successful. 'Error' or "Success' | string | |
new_key | Indicates a new call signature needs calculated. Applicable only when using Session Token v2 | yes/no flag | |
current_api_version | The latest stable API version number | string |
Response when NOT specifying a destination folder which moves your folder to root (MyFiles)
Name | Description | Type | Value |
---|---|---|---|
asynchronous | Specifies whether the restore is being processed asynchronously. If yes, poll device/get_status to determine when the job is complete | flag | yes/no |
new_names | A collection of folders entered that had their names changed to avoid collisions in the destination | object | |
revision | The MyFiles revision number (under 'myfiles_revision') | integer |
Error Codes
To view a list of possible error codes for this API, and their descriptions, click here.
Examples:
Example 1 (Success with JSON - folder_path_src and folder_key_dst=myfiles):
HTTPS://www.mediafire.com/api/1.5/folder/move.php?session_token=&folder_path_src=stay%2Ftest%20001%2Ftest%20101(2)&folder_key_dst=myfiles&response_format=json&signature=
{
action: folder/move,
asynchronous: no,
new_names: ,
result: Success,
new_key: yes,
current_api_version: 1.5,
new_device_revision: 162749,
}
Example 2 (Success with JSON - private folder_key_src and public folder_key_dst not owned by session user but having edit permissions):
HTTPS://www.mediafire.com/api/1.5/folder/move.php?session_token=&folder_key_src=adhh9bywxj7b4&folder_key_dst=zoppn89frkah9&response_format=json&signature=
{
action: folder/move,
asynchronous: no,
new_names: ,
result: Success,
new_key: yes,
current_api_version: 1.5,
new_device_revision: 1134,
}
Example 2 (Failure with XML - Error 114 with folder_key_src and folder_key_dst not owned by session user and lacking edit permissions):
HTTPS://www.mediafire.com/api/1.5/folder/move.php?session_token=&folder_key_src=354ziuhvffe29&folder_key_dst=4wld8uv6thlas&response_format=xml&signature=
<action>folder/move</action>
<message>Access denied</message>
<error>114</error>
<result>Error</result>
<new_key>yes</new_key>
<current_api_version>1.5</current_api_version>
Purge
Description : Deletes one or more of a session user's folders permanently, along with all contents of the folders, by removing their entries from the database. THIS OPTION CANNOT BE UNDONE.
Required Parameters:
- session_token : A type 1 or type 2 session token. (Type 2 will require a call signature).
Relative Parameters:
- folder_key : A comma-separated list of folder keys. Required if folder_path is not passed. Takes precedence over folder_path.
- folder_path : The absolute path to a single folder in the session user's account. Required if folder_key is not passed.
- signature : Required only for session token version 2. Click here to learn more about building an API call signature.
Optional Parameters:
- response_format : 'xml' or 'json' (default 'xml')
Response Properties
Name | Description | Type | Value |
---|---|---|---|
asynchronous | Specifies whether the restore is being processed asynchronously. If yes, poll device/get_status to determine when the job is complete | flag | yes/no |
error | The numerical error code | integer | 112, 114, 259 |
message | The error description for the error | string | |
deprecated | Indicates this API is deprecated and should no longer be used | string | |
new_device_revision | The revision number of the device. Returned only when the revision number has changed. | integer | |
result | Indicates if the API call was successful. 'Error' or "Success' | string | |
new_key | Indicates a new call signature needs calculated. Applicable only when using Session Token v2 | yes/no flag | |
current_api_version | The latest stable API version number | string |
Error Codes
To view a list of possible error codes for this API, and their descriptions, click here.
Examples:
Example 1 (Success with JSON - folder_path):
HTTPS://www.mediafire.com/api/1.5/folder/purge.php?session_token=&folder_path=stay%2Ftest%20001%2Fphotos&response_format=json&signature=
{
action: folder/purge,
asynchronous: no,
result: Success,
new_key: yes,
current_api_version: 1.5,
new_device_revision: 162751,
}
Example 2 (Failure with JSON - Error 114 with folder_key not owned by session user):
HTTPS://www.mediafire.com/api/1.5/folder/purge.php?session_token=&folder_key=tip1zg4gbsz4k&response_format=json&signature=
{
action: folder/purge,
message: Access denied,
error: 114,
result: Error,
new_key: yes,
current_api_version: 1.5,
}
Search
Notes:
The search term must be at least three characters in length.
Description : Searches the the content of a given folder. If folder_key is not passed, then the search will be performed on the root folder ("myfiles"). In this case, the session token will be required. To search the root folder on devices other than the cloud, pass the device_id. If device_id is '-1', then a global search on all devices will be performed.
Required Parameters:
- search_text : The search keywords to look for in filenames, folder names, and descriptions. The string must be at least 3 characters in length.
Relative Parameters:
- folder_key : A folder key. Required if session_token and folder_path are not passed. Takes precedence over folder_path. If folder_key and folder_path are not passed, device 0's(cloud) root is used. myfiles may be passed as a moniker for device 0's(cloud) root.
- folder_path : The absolute path to a single folder in the session user's account. Required if folder_key is not passed.
- session_token : A type 1 or type 2 session token. (Type 2 will require a call signature). Needed only when accessing root folder, private folder, or the folder's private content.
- signature : Required only for session token version 2. Click here to learn more about building an API call signature.
Optional Parameters:
- filter : filter by privacy and/or by filetype. This is a comma-separated list of file types and privacy options. Can take one or more of the following values : "public", "private", "image", "video", "audio", "document", "spreadsheet", "presentation", "application", "archive", "data", and "development".
- device_id : An integer specifying on which user device to look for data. If not passed, device 0's(cloud) root is used. If device_id=-1 the search will be performed on all devices.
- search_all : 'yes' or 'no'. If folder_key is passed, then this parameter is ignored. If folder_key is not passed, search_all can be used to indicate whether to search the root folder only or the entire device (default 'yes').
- details: "yes", "no", or "shallow" ("no" by default). If "yes", the API returns the total_files, total_folders, and total_size for all the contained folders and files recursively of each folder. However, there is a limit on how many items can be counted. If the limit is reached, an extra property overflow will be returned as well. If "shallow" is specified, the API returns the byte_count of files immediately inside each folder (non-recursive).
- response_format : 'xml' or 'json' (default 'xml')
Response Properties
Name | Description | Type | Value |
---|---|---|---|
relevancy | Specifies how close, as a percentage, the object matches the search term | integer | |
error | The numerical error code | integer | 128, 259 |
message | The error description for the error | string | |
deprecated | Indicates this API is deprecated and should no longer be used | string | |
result | Indicates if the API call was successful. 'Error' or "Success' | string | |
new_key | Indicates a new call signature needs calculated. Applicable only when using Session Token v2 | yes/no flag | |
current_api_version | The latest stable API version number | string | |
type | The content type | string | folder, file |
quickkey | The quickkey of the file found | string | |
filename | The file name | string | |
parent_folderkey | The parent folder key | string | |
parent_name | The parent folder name | string | |
created | The date/time the folder or file was created | string timestamp | |
size | The size of the file or folder in bytes | integer | |
description | The description of the file or folder | string | |
password_protected | Indicates if the file or folder is password protected. 'yes' or 'no' [DEPRECATED] | yes/no flag | |
mimetype | The mimetype of the file | string | |
filetype | The filetype | string | application, archive, audio, development, data, document, image, presentation, spreadsheet, video |
view | Specifies if this file is viewable via MediaFire and, if so, by what system | integer | 0(Not Viewable, 1(PDF2HTMLex), 2(Syntax Highlighting), 3(PHP Excel), 4(AbiWord), 5(PDF2HTMLex with GS PDF Split), 6(PlainText), 7(Image Gallery), 9(JPlayer Audio), 10(JPlayer Audio with Transcode), 11(JPlayer Video), 12(JPlayer Video with Transcode) |
edit | Specifies if this file can be edited via MediaFire and, if so, by what system | integer | . 0 [not-editable], 1 [Text Editor], 2 [deprecated]. |
hash | The hash of the file | string | |
flag | Details regarding the search results | bitmask | 1 (File is owned by the session user), 2 (File is supported for preview), 4 (File is editable), 8 (File is virus flagged) [Flags not listed are for internal MediaFire operations and not public use] |
folderkey | The folderkey | string | |
name | The folder or file name | string | |
revision | The revision number of the file or folder | integer | |
privacy | Indicates the privacy level of the file or folder | string | private/public |
total_folders | The number of folder children, recursively, in the folder | integer | |
total_files | The number of file children, recursively, in the folder | integer | |
total_size | The size of the folder incorporating all child files, recursively | integer | |
byte_count | The size of the folder incorporating only immediate child files | integer |
Error Codes
To view a list of possible error codes for this API, and their descriptions, click here.
Examples:
Example 1 (Success with JSON - folder results, folder_key=myfiles and details=yes):
HTTPS://www.mediafire.com/api/1.5/folder/search.php?search_text=Test&session_token=&folder_key=myfiles&search_all=no&details=yes&response_format=json&signature=
{
action: folder/search,
results_count: 1,
results:[
{
type: folder,
folderkey: b5brfb1s16fr0,
name: Test 002,
parent_folderkey: myfiles,
parent_name: myfiles,
revision: 162725,
privacy: public,
total_folders: 1,
total_files: 9,
total_size: 96634991,
relevancy: 100,
}
]
result: Success,
new_key: yes,
current_api_version: 1.5,
}
Example 2 (Success with XML - file results, file_path, and search_all=no):
HTTPS://www.mediafire.com/api/1.5/folder/search.php?search_text=sample&session_token=&folder_path=Test%20002&search_all=no&response_format=xml&signature=
<action>folder/search</action>
<results_count>1</results_count>
<results>
<result>
<type>file</type>
<quickkey>eu9fs1setas5a05</quickkey>
<filename>Sample - Golden Gate HDR.jpg</filename>
<parent_folderkey>b5brfb1s16fr0</parent_folderkey>
<parent_name>Test 002</parent_name>
<created>2015-04-30 19:30:55</created>
<revision>162699</revision>
<size>8875464</size>
<description>The Golden Gate Bridge in HDR by Andrew Wong http://www.flickr.com/photos/wongdood/</description>
<privacy>public</privacy>
<password_protected>no</password_protected>
<mimetype>image/jpeg</mimetype>
<filetype>image</filetype>
<view>2</view>
<edit>0</edit>
<hash>09096fef3fb73c309be45bd93a799f804dc343a54b25d8063cbf3980b27e9eb6</hash>
<flag>6</flag>
<relevancy>100</relevancy>
<created_utc>2015-05-01T00:30:55Z</created_utc>
</result>
</results>
<result>Success</result>
<new_key>yes</new_key>
<current_api_version>1.5</current_api_version>
Example 3 (Success with JSON - no results):
HTTPS://www.mediafire.com/api/folder/search.php?search_text=none&session_token=&search_all=no&details=yes&response_format=json&signature=
{
action: folder/search,
results_count: 0,
results: ,
result: Success,
new_key: yes,
current_api_version: 1.5,
}
Example 5 (Failure with XML - Error 128):
HTTPS://www.mediafire.com/api/folder/search.php?search_text=tx&session_token=&search_all=no&response_format=xml&signature=
<action>folder/search</action>
<message>Required parameters for this request are missing</message>
<error>128</error>
<result>Error</result>
<current_api_version>1.5</current_api_version>
Update
Description : Update a folder's information.
Required Parameters:
- session_token : A type 1 or type 2 session token. (Type 2 will require a call signature).
Relative Parameters:
- folder_key : A folder key. Required if session_token and folder_path are not passed. Takes precedence over folder_path. If folder_key and folder_path are not passed, device 0's(cloud) root is used. myfiles may be passed as a moniker for device 0's(cloud) root.
- folder_path : The absolute path to a single folder in the session user's account. Required if folder_key is not passed.
- signature : Required only for session token version 2. Click here to learn more about building an API call signature.
Optional Parameters:
- foldername : The name of the folder.
- description : The description of the folder.
- privacy : Privacy of the folder ('public' or 'private').
- privacy_recursive : Whether or not applying 'privacy' to sub-folders - 'yes' or 'no' (default 'no').
- mtime : The date/time of the update. If not set, the current server time will be used. Refer to the following document for valid date/time formats: http://www.php.net/manual/en/datetime.formats.php
Response Properties
Name | Description | Type | Value |
---|---|---|---|
asynchronous | Specifies whether the restore is being processed asynchronously. If yes, poll device/get_status to determine when the job is complete | flag | yes/no |
error | The numerical error code | integer | 128, 159, 259 |
message | The error description for the error | string | |
deprecated | Indicates this API is deprecated and should no longer be used | string | |
new_device_revision | The revision number of the device. Returned only when the revision number has changed. | integer | |
result | Indicates if the API call was successful. 'Error' or "Success' | string | |
new_key | Indicates a new call signature needs calculated. Applicable only when using Session Token v2 | yes/no flag | |
current_api_version | The latest stable API version number | string |
Error Codes
To view a list of possible error codes for this API, and their descriptions, click here.
Examples:
Example 1 (Success with JSON - folder_name, folder_key, description, and privacy=public):
HTTPS://www.mediafire.com/api/1.5/folder/update.php?session_token=&folder_key=o010fltlq2tdy&foldername=Test%20004&description=This%20is%20a%20test%20folder&privacy=public&privacy_recursive=yes&response_format=json&signature=
{
action: folder/update,
asynchronous: no,
result: Success,
new_key: yes,
current_api_version: 1.5,
new_device_revision: 161694,
}
Example 2 (Success with XML - folder_path & foldername):
HTTPS://www.mediafire.com/api/1.5/folder/update.php?session_token=&folder_path=stay%2Fstuff&foldername=Test%20001&privacy_recursive=yes&response_format=xml&signature=
<action>folder/update</action>
<asynchronous>no</asynchronous>
<result>Success</result>
<new_key>yes</new_key>
<current_api_version>1.3</current_api_version>
<new_device_revision>162755</new_device_revision>
Example 3 (Failure with JSON - Error 159):
HTTPS://www.mediafire.com/api/1.5/folder/update.php?&session_token=&folder_key=bwg3kssw4o5f7&foldername=Test01&privacy=public&privacy_recursive=no&response_format=json&signature=
{
action: folder/update,
message: This folder exists already,
error: 159,
result: Error,
new_key: yes,
current_api_version: 1.5,
}