File1.1
Configure One Time Download
Description : Allows configuring/modifying the options related to an existing one-time download link, such as 'duration', 'email_notification', 'success_callback_url', 'error_callback_url,'etc...
Required Parameters
- session_token : A type 1 or type 2 session token. (Type 2 will require a call signature).
- token : Token is assigned when requesting a one_time_download (1td) link. For example, in the link http://www.mediafire.com/?yuuib4pk0i0uf586ta6gil1r3j92f98, the token is yuuib4pk0i0uf586ta6gil1r3j92f98.
Optional Parameters
- signature : This is the call signature that is required to authenticate a type 2 session token transaction.
- duration : The number of minutes this link is valid. There isn't a default. If 'duration' is not assigned, the link expires whenever it was originally set to expire.
- email_notification : Whether or not to send an email notification to the file owner. Signify 'yes' or 'no. If no selection is made, default response is set to "no".
- success_callback_url : An absolute URL which is called when the user successfully downloads the file.
- error_callback_url : An absolute URL which is called when the download fails.
- bind_ip : An IP mask/range or a comma-separated list of IP masks/ranges to restrict the download to matching user IP addresses. (e.g. '68.154.11.0/8, 145.230.230.115-145.230.240.33, 78.192.10.10').
- burn_after_use : Whether or not to invalidate the one-time link after it's used. This parameter is ignored if bind_ip is not passed. 'yes' or 'no' (default 'yes').
- response_format : 'xml' or 'json' (default 'xml')
Example:
http://www.mediafire.com/api/1.1/file/configure_one_time_download.php?session_token=35a203a91867b2737af3d63462ce7d5473f07e6b0463ba0e9092a049866c20adc1ff4c1461e4843ca44468803781fe774e769a8a62c48b11810678ad7ceb9c485efa5e9e7b1302d0&token=yuuib4pk0i0uf586ta6gil1r3j92f98&duration=7200&email_notification=no&success_callback_url=http://www.yourcompany.com/my_callback.php&error_callback_url=http://www.yourcompany.com/error_callback.php&burn_after_use=yes&response_format=xml
<response>
<action>file/configure_one_time_download</action>
<one_time_download_request_count>1</one_time_download_request_count>
<result>Success</result>
<current_api_version>1.0</current_api_version>
</response>
Configure One Time Key
Note: API name change from file/configure_one_time_download.
Description : Allows configuring/modifying of the options related to an existing one-time download link, such as 'duration', 'email_notification', 'success_callback_url', 'error_callback_url,'etc...
Required Parameters
- session_token : A type 1 or type 2 session token. (Type 2 will require a call signature).
- token : Token is assigned when requesting a one_time_download (1td) link. For example, in the link http://www.mediafire.com/?yuuib4pk0i0uf586ta6gil1r3j92f98, the token is yuuib4pk0i0uf586ta6gil1r3j92f98.
Relative Parameters
- signature : This is the call signature that is required to authenticate a type 2 session token transaction.
Optional Parameters
- duration : The number of minutes this link is valid. There isn't a default. If 'duration' is not assigned, the link expires whenever it was originally set to expire.
- email_notification : Whether or not to send an email notification to the file owner. Signify 'yes' or 'no. If no selection is made, default response is set to "no".
- success_callback_url : An absolute URL which is called when the user successfully downloads the file.
- error_callback_url : An absolute URL which is called when the download fails.
- bind_ip : An IP mask/range or a comma-separated list of IP masks/ranges to restrict the download to matching user IP addresses. (e.g. '68.154.11.1/8, 145.230.230.115-145.230.240.33, 78.192.10.10').
- burn_after_use : Whether or not to invalidate the one-time link after it's used. This parameter is ignored if bind_ip is not passed. 'yes' or 'no' (default 'yes').
- response_format : 'xml' or 'json' (default 'xml')
Response Properties
- one_time_download_request_count: The amount of times the one time download link has been requested
- result: Indicates if the API call was successful: 'Success' or 'Error'
- current_api_version: The API version
- message: Error message for supplying a bad session token: 'The supplied Session Token is expired or invalid'
- error: Error number for a supplying a bad session token: '105'
Example:
http://www.mediafire.com/api/1.1/file/configure_one_time_key.php?session_token=35a203a91867b2737af3d63462ce7d5473f07e6b0463ba0e9092a049866c20adc1ff4c1461e4843ca44468803781fe774e769a8a62c48b11810678ad7ceb9c485efa5e9e7b1302d0&token=yuuib4pk0i0uf586ta6gil1r3j92f98&duration=7200&email_notification=no&success_callback_url=http://www.yourcompany.com/my_callback.php&error_callback_url=http://www.yourcompany.com/error_callback.php&burn_after_use=yes&response_format=xml
<response>
<action>file/configure_one_time_key</action>
<one_time_download_request_count>1</one_time_download_request_count>
<result>Success</result>
<current_api_version>1.1</current_api_version>
</response>
Copy
Description : Copy a file to a specified folder. Any file can be copied whether it belongs to the session user or another user. However, the target folder must be owned by the session caller. Private files not owned by the session caller cannot be copied.
Required Parameters
- session_token : A type 1 or type 2 session token. (Type 2 will require a call signature).
- quick_key : The quickkey of the file to be copied. You can specify multiple quickkeys separated by a comma.
Optional Parameters
- signature : This is the call signature that is required to authenticate a type 2 session token transaction.
- folder_key : The key that identifies the destination folder. If omitted, the destination folder will be the root folder (My files).
- response_format : 'xml' or 'json' (default 'xml')
Response Properties
- new_quickkey: The file key created for a successful copy of the origin file.
- skipped_count: The amount of files which were not copied due to a restriction preventing the copy.
- other_count: The amount of files which were not copied due to an error preventing the copy.
- current_api_version: The API version
- device_revision: The device revision
- result: Indicates if the API call was successful: 'Success' or 'Error'
- new_key: Indicates if a new key was created. 'yes' or 'no'
- message: Error message for supplying a bad session token: 'The supplied Session Token is expired or invalid'
- error: Error number for a supplying a bad session token: '105'
Example:
http://www.mediafire.com/api/1.1/file/copy.php?session_token=5335c97f17426e9a077cefcc5ee02d7a66b480ddabd34a76696ab9830f17d7f724bf44e4fb29ca5c2c023f9a4c9f3e9752aac7b29fa911faf0e577e94a84f7f1971ee51ff145968e&quick_key=cu8pzeipcz2hhhn&folder_key=dd9cmgl746p4p
<response>
<action>file/copy</action>
<new_quickkeys>
<new_quickkey>jf4bcgrbrqz0185</new_quickkey>
</new_quickkeys>
<skipped_count>0</skipped_count>
<other_count>0</other_count>
<result>Success</result>
<current_api_version>1.1</current_api_version>
</response>
http://www.mediafire.com/api/1.1/file/copy.php?quick_key=cu8pzeipcz2hhhn&folder_key=dd9cmgl746p4p&response_format=json&session_token=5335c97f17426e9a077cefcc5ee02d7a66b480ddabd34a76696ab9830f17d7f724bf44e4fb29ca5c2c023f9a4c9f3e9752aac7b29fa911faf0e577e94a84f7f1971ee51ff145968e
{
"response": {
"action": "file/copy",
"new_quickkeys": [
"jf4bcgrbrqz0185"
],
"skipped_count": "0",
"other_count": "0",
"device_revision": "123",
"result": "Success",
"current_api_version": "1.1"
}
}
Create
Description: Creates a new file.
Required Parameters:
- session_token : A type 1 or type 2 session token. (Type 2 will require a call signature).
Relative parameters:
- file_extension: The mime type extension of the file. Required if filename is not set & passed. Ignored if filename is set & passed. Values: 'txt'.
- signature : This is the call signature that is required to authenticate a type 2 session token transaction.
Optional Parameters:
- filename : The name of the file to be created. If not passed, a new name will be generated and file_extension is then required. The filename should be 3 to 255 characters in length.
- parent_key : The folder_key that identifies an existing folder in which the new file is to be created. If not specified, the new file will be created in the root folder (My files).
- mtime : The date/time of the file's creation. If not set, the current server time will be used. 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_format : 'xml' or 'json' (default 'xml')
Response Properties
- quickkey: The quickkey of the new file
- filename: The name of the new file
- created: The date and time the file was created
- downloads: The amount of times the file has been downloaded
- description: The description of the file
- size: The size of the file
- privacy: Indicates the security of the file. 'private' or 'public'
- password_protected: Indicates of the file is password protected. [deprecated]
- hash: The hash of the file
- filetype: Type of file
- mimetype: Mimetype of the file
- flag: A bit-mask value specifying special details about a file. The following is a list of bits and their meanings. Flag descriptions not present are for internal MediaFire use only and therefore not on public distribution:
- 1 : File is owned by the session user.
- 2 : File is supported for preview.
- 4 : File is editable.
- 8 : File is virus flagged
- shared_by_user: Present and set to 1 if the file owner has shared the file.
- permissions: Present if the session user has permissions to the file. Values: 0=read, 1=read+write, 2=manage (Not In Use).
- revision: The revision of the file
- 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].
- edit: Specifies if this file can be edited via MediaFire and, if so, by what system. 0 [not-editable], 1 [Text Editor], 2 [deprecated].
- result: Indicates if the API call was successful: 'Success' or 'Error'
- current_api_version: The API version
- new_key: Indicates if a new session token was created. 'yes' or 'no'
Link Information
- 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
- 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)
Error Responses From Supplying a Bad Session Token:
- message: Error message for supplying a bad session token: 'The supplied Session Token is expired or invalid'
- error: Error number for a supplying a bad session token: '105'
Example:
http://www.mediafire.com/api/1.1/file/create.php?session_token=11e9322290284ce58b3f80e9d897a18eb3737e80d0202def2983d02887fff8ccec01b1046e064beeefc94ab118c2531d34f316e4e5567da064cf73d35af55012d6e4e3ba22e0c142&filename=test_create_file.txt
<response>
<action>file/create</action>
<fileinfo>
<quickkey>h8rhtpjx9za16cb</quickkey>
<filename>test_create_file.txt</filename>
<created>2013-02-18 16:17:29</created>
<downloads>0</downloads>
<description/>
<tags/>
<size>2</size>
<privacy>public</privacy>
<password_protected>no</password_protected>
<filetype>other</filetype>
<flag>2</flag>
</fileinfo>
<result>Success</result>
<current_api_version>1.1</current_api_version>
</response>
Create Snapshot
Description: Creates a duplicate of a file as a new revision.
Required Parameters:
- session_token : A type 1 or type 2 session token. (Type 2 will require a call signature).
- quick_key : The quickkey of the file requiring a snapshot.
Optional Parameters:
- signature : This is the call signature that is required to authenticate a type 2 session token transaction.
- response_format : 'xml' or 'json' (default 'xml')
Response Properties
- new_revision: The revision of the file
- old_revision: The prior revision of the file
- result: Indicates if the API call was successful: 'Success' or 'Error'
- current_api_version: The API version
- message: Error message for supplying a bad session token: 'The supplied Session Token is expired or invalid'
- error: Error number for a supplying a bad session token: '105'
Example:
http://www.mediafire.com/api/1.1/file/create_snapshot.php?session_token=11e9322290284ce58b3f80e9d897a18eb3737e80d0202def2983d02887fff8ccec01b1046e064beeefc94ab118c2531d34f316e4e5567da064cf73d35af55012d6e4e3ba22e0c142&quick_key=h8rhtpjx9za16cb
<response>
<action>file/create_snapshot</action>
<new_revision>1520</new_revision>
<old_revision>1519</old_revision>
<result>Success</result>
<current_api_version>1.1</current_api_version>
</response>
Delete
Description: Delete a user's file. The file is moved to the Trash Can. Once a file has been moved to the Trash Can it is still accessible through device/get_trash.
Required Parameters:
- session_token : A type 1 or type 2 session token. (Type 2 will require a call signature).
- quick_key : The quickkey that identifies the file. You can also specify multiple quickkeys separated by commas.
Optional Parameters:
- signature : This is the call signature that is required to authenticate a type 2 session token transaction.
- response_format : 'xml' or 'json' (default 'xml')
Response Properties
- device_revision: The revision of the device
- result: Indicates if the API call was successful: 'Success' or 'Error'
- current_api_version: The API version
- new_key: Indicates if a new key was created. 'yes' or 'no'
- message: Error message for supplying a bad session token: 'The supplied Session Token is expired or invalid'
- error: Error number for a supplying a bad session token: '105'
Example:
http://www.mediafire.com/api/1.1/file/delete.php?session_token=11e9322290284ce58b3f80e9d897a18eb3737e80d0202def2983d02887fff8ccec01b1046e064beeefc94ab118c2531d34f316e4e5567da064cf73d35af55012d6e4e3ba22e0c142&quick_key=h8rhtpjx9za16cb
<response>
<action>file/delete</action>
<myfiles_revision>
<revision>243.4</revision>
<epoch>1360959064</epoch>
</myfiles_revision>
<result>Success</result>
<current_api_version>1.1</current_api_version>
</response>
Get Flags
Deprecated. Use file/get_info instead.
Description: Returns a bitmask value of special information about a file.
Required Parameters:
- session_token : A type 1 or type 2 session token. (Type 2 will require a call signature).Needed only when accessing a user's private files.
- quick_key : The quickkey that identifies the file. You can also specify multiple quickkeys separated by commas. The maximum number of quickkeys allowed is 500.
Optional Parameters:
- signature : This is the call signature that is required to authenticate a type 2 session token transaction.
- response_format : 'xml' or 'json' (default 'xml')
Example:
http://www.mediafire.com/api/1.1/file/get_flags.php?session_token=736d51e04a51a2210f6182951d84bad3e9de5fa0dc12894589e83fa434e5276f9cc7f4aa00bf883d7269ec51ddd911014e30eac29ad754db7c8bfa166f7130373b39d6595a9dfda7&quick_key=p72btpmf38j5j09&quick_key=uau4cofs8ya82h4
<response>
<action>file/get_flags</action>
<file_flag>
<quickkey>uau4cofs8ya82h4</quickkey>
<flags>0</flags>
</file_flag>
<deprecated>yes</deprecated>
<result>Success</result>
<current_api_version>1.0</current_api_version>
</response>
Get Info
Notes: The parameter quickkey accepts one-time keys for arguments. Additionally, responses for one-time keys do not include sections that would reveal the file key.
Description: Returns a list of the file's details. This call will return the quickkey, filename, creation date, description, status, size, flag ...etc.
Required Parameters:
- quick_key : The quickkey that identifies the file. You can also specify multiple quickkeys separated by commas. The maximum number of quickkeys allowed is 500.
Relative Parameters:
- session_token : A type 1 or type 2 session token. (Type 2 will require a call signature).
- signature : This is the call signature that is required to authenticate a type 2 session token transaction.
Optional Parameters:
- response_format : 'xml' or 'json' (default 'xml')
Response Properties
- quickkey: The quickkey of the file
- filename: The name of the file
- created: The date and time the file was created
- downloads: The amount of times the file has been downloaded
- description: The description of the file
- size: The size of the file
- privacy: The status of the file. 'public' or 'private'
- password_protected: Indicates if the file is password protected [deprecated feature]
- hash: The SHA256 hash of a file. In the case of older files it will be the MD5 hash of the file
- filetype: The file type
- mimetype: The mimetype of the file
- owner_name: The owner of the file
- flag: A bit-mask value specifying special details about a file. The following is a list of bits and their meanings (meanings not listed are internal MediaFire notifications and not meant for public distribution):
- 1: File is owned by the session user.
- 2: File is supported for preview.
- 4: File is editable.
- shared_by_user: Present and set to 1 if the file owner has shared the file.
- permissions: Present if the session user has permissions to the file. Values: 0=read, 1=read+write, 2=manage (Not In Use).
- parent_folderkey: The key of the folder containing the file
- revision: The amount of revisions made to the file
- 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].
- edit: Specifies if this file can be edited via MediaFire and, if so, by what system. 0 [not-editable], 1 [Text Editor], 2 [deprecated].
- view: The view URL of the file (this is listed under "links")
- normal_download: The download URL of the file(this is listed under "links)
- result: Indicates if the API call was successful: 'Success' or 'Error'
- current_api_version: The API version
- new_key: Indicates if a new key was created. 'yes' or 'no'
- message: Error message for supplying a bad session token: 'The supplied Session Token is expired or invalid'
- error: Error number for a supplying a bad session token: '105'
Example 1 (File owned by a session user):
http://www.mediafire.com/api/file/get_info.php?session_token=123456789012345678901234567890123456789012345678901234567890&quick_key=8c4ff4fzufdbbip&version=1
<response>
<action>file/get_info</action>
<file_info>
<quickkey>z3gwya3gv0j3rwd</quickkey>
<filename>1368028908.dat</filename>
<created>2013-05-08 11:00:47</created>
<downloads>0</downloads>
<description>Test doc</description>
<size>4194304</size>
<privacy>public</privacy>
<password_protected>no</password_protected>
<hash>6edfd801c5431b350eafdab5a981c9286cb996a881fd646a5935d792b74242b2</hash>
<filetype>other</filetype>
<mimetype>application/octet-stream</mimetype>
<owner_name>TestHerbert</owner_name>
<flag>2</flag>
<shared_by_user>1</shared_by_user>
<permissions>2</permissions>
<parent_folderkey>7gpavwtgpcpr9</parent_folderkey>
<revision>145</revision>
</file_info>
<result>Success</result>
<current_api_version>1.1</current_api_version>
</response>
Example 2 (File is shared with session user):
HTTPS://dev.mediafire.com/api/1.0/file/get_info.php?quick_key=3lpuc2dct3xw0o7&session_token=&response_format=json&signature=
response:{
action: file/get_info,
file_info:{
quickkey: 3lpuc2dct3xw0o7,
filename: Tree Ornaments.jpg,
created: 2014-06-17 13:15:40,
description: ,
size: 876926,
privacy: public,
password_protected: no,
hash: 68cfaeb3c9847f99918751143749606cb6cc1210f08e4f405d06aee8e08787ca,
filetype: image,
mimetype: image/jpeg,
owner_name: Test 02,
flag: 4,
permissions:{
value: 1,
explicit: 1,
read: 1,
write: 0,
}
revision: 150,
view: 2,
edit: 0,
links:{
view: http://dev.mediafire.com/view/3lpuc2dct3xw0o7/Tree_Ornaments.jpg,
normal_download: http://dev.mediafire.com/file/3lpuc2dct3xw0o7/Tree_Ornaments.jpg,
}
}
result: Success,
new_key: yes,
current_api_version: 1.1,
}
Get Links
Description : Returns the view link, normal download link, and, if possible, the direct download link of a file. If the direct download link is not returned, an error message is returned explaining the reason.
Special Note About Link Penalties: Streaming bandwidth is deducted at the time the link is used.
Required Parameters:
- quick_key : The quickkey that identifies the file. You can also specify multiple quickkeys separated by commas.
Optional Parameters:
- session_token : A type 1 or type 2 session token. (Type 2 will require a call signature). Needed only when trying to get the direct download link.
- signature : This is the call signature that is required to authenticate a type 2 session token transaction.
- link_type : Specify which link type is to be returned. Accepted values: "view", "edit", "normal_download", "direct_download", "one_time", "listen", "watch", and "streaming". If not passed, all link types are returned except for "direct_download" and "streaming". With the "direct_download" link, users have a daily free bandwidth of 50 GB.
- response_format : 'xml' or 'json' (default 'xml')
Response Properties
- current_api_version: The API version
- new_key: Indicates if a new key was created. 'yes' or 'no'
Link Responses:
- quickkey: The quickkey of the file
- view: The view link of the file
- read: The read-only link of the file
- edit_error_message: The error message of the file. 'File is not editable'
- normal_download: The normal download link of the file
Download Link Responses:
- download: The one time download link of the file
- view: The one-time view link of the file
- one_time_key_request_count: The amount of times the one time key has been requested
- one_time_key_request_max_count: The maximum number of times the key can be requested in a 24 hour period
Error Responses From Supplying a Bad Session Token:
- message: Error message for supplying a bad session token: 'The supplied Session Token is expired or invalid'
- error: Error number for a supplying a bad session token: '105'
More Possible Error Messages
- edit_error_message:
- User lacks edit permissions
- File is not editable
- one_time_download_error_message
- User is not authenticated
- No session token provided
- Daily limit for one-time download links exceeded
- Link unavailable
- direct_download_error_message
- Insufficient bandwidth
- Insufficient Permissions
- Link unavailable
- direct_download_error
- 40: Link unavailable
- 41: Account suspended
- 44: Insufficient bandwidth
- 45: Insufficient Permissions
Example 1 (Default Links):
http://www.mediafire.com/api/1.1/file/get_links.php?quick_key=awexld5n7qmj5hy&session_token=bca2ed5fa166eb0916f83f2d0bd7ac85d107bee5dd3d26f7835595168237dfd51ba628df05c3ce91d38c2718f2f6cc4bf82ef31a418f2d85309732b8b020e629ad3824647529f6eb
<response>
<action>file/get_links</action>
<links>
<link>
<quickkey>awexld5n7qmj5hy</quickkey>
<view>
http://www.mediafire.com/view/awexld5n7qmj5hy/Marugame_Castle_Path.jpg
</view>
<read>
http://www.mediafire.com/view/awexld5n7qmj5hy/Marugame_Castle_Path.jpg
</read>
<edit_error_message>File is not editable</edit_error_message>
<normal_download>
http://www.mediafire.com/file/awexld5n7qmj5hy/Marugame_Castle_Path.jpg
</normal_download>
<one_time>
<download>
http://www.mediafire.com/?x1n363923sxe4e064mjn2mpg44hj7mw
</download>
<view>
http://www.mediafire.com/view/x1n363923sxe4e064mjn2mpg44hj7mw
</view>
</one_time>
</link>
</links>
<one_time_key_request_count>2</one_time_key_request_count>
<one_time_key_request_max_count>100</one_time_key_request_max_count>
<result>Success</result>
<current_api_version>1.1</current_api_version>
</response>
Example (Default Links, JSON):
http://www.mediafire.com/api/1.1/file/get_links.php?quick_key=awexld5n7qmj5hy&response_format=json&session_token=bca2ed5fa166eb0916f83f2d0bd7ac85d107bee5dd3d26f7835595168237dfd51ba628df05c3ce91d38c2718f2f6cc4bf82ef31a418f2d85309732b8b020e629ad3824647529f6eb
{
"response": {
"action": "file/get_links",
"links": [
{
"quickkey": "awexld5n7qmj5hy",
"view": "http://www.mediafire.com/view/awexld5n7qmj5hy/Marugame_Castle_Path.jpg",
"read": "http://www.mediafire.com/view/awexld5n7qmj5hy/Marugame_Castle_Path.jpg",
"edit_error_message": "File is not editable",
"normal_download": "http://www.mediafire.com/file/awexld5n7qmj5hy/Marugame_Castle_Path.jpg",
"one_time": {
"download": "http://www.mediafire.com/?tkxcoz2nehqjxvr444iz4oxe37boxyh",
"view": "http://www.mediafire.com/view/tkxcoz2nehqjxvr444iz4oxe37boxyh"
}
}
],
"one_time_key_request_count": "2",
"one_time_key_request_max_count": "100",
"result": "Success",
"current_api_version": "1.1"
}
}
Example 3 (Audio):
http://www.mediafire.com/api/1.1/file/get_links.php?quick_key=ll3wpapd57suvdk,a7udmnczzdsk633,bt7ts8ai6a9gh3f&link_type=listen&session_token=bca2ed5fa166eb0916f83f2d0bd7ac85d107bee5dd3d26f7835595168237dfd51ba628df05c3ce91d38c2718f2f6cc4bf82ef31a418f2d85309732b8b020e629ad3824647529f6eb
<response>
<action>file/get_links</action>
<links>
<link>
<quickkey>ll3wpapd57suvdk</quickkey>
<listen>
http://www.mediafire.com/listen/ll3wpapd57suvdk/variableman_1_dick_64kb.mp3
</listen>
</link>
<link>
<quickkey>a7udmnczzdsk633</quickkey>
<listen>
http://www.mediafire.com/listen/a7udmnczzdsk633/variableman_2_dick_64kb.mp3
</listen>
</link>
<link>
<quickkey>bt7ts8ai6a9gh3f</quickkey>
<listen>
http://www.mediafire.com/listen/bt7ts8ai6a9gh3f/variableman_3_dick_64kb.mp3
</listen>
</link>
</links>
<result>Success</result>
<current_api_version>1.1</current_api_version>
</response>
Example 4 (Audio, JSON):
http://www.mediafire.com/api/1.1/file/get_links.php?quick_key=ll3wpapd57suvdk,a7udmnczzdsk633,bt7ts8ai6a9gh3f&link_type=listen&response_format=json&session_token=bca2ed5fa166eb0916f83f2d0bd7ac85d107bee5dd3d26f7835595168237dfd51ba628df05c3ce91d38c2718f2f6cc4bf82ef31a418f2d85309732b8b020e629ad3824647529f6eb
{
"response": {
"action": "file/get_links",
"links": [
{
"quickkey": "ll3wpapd57suvdk",
"listen": "http://www.mediafire.com/listen/ll3wpapd57suvdk/variableman_1_dick_64kb.mp3"
},
{
"quickkey": "a7udmnczzdsk633",
"listen": "http://www.mediafire.com/listen/a7udmnczzdsk633/variableman_2_dick_64kb.mp3"
},
{
"quickkey": "bt7ts8ai6a9gh3f",
"listen": "http://www.mediafire.com/listen/bt7ts8ai6a9gh3f/variableman_3_dick_64kb.mp3"
}
],
"result": "Success",
"current_api_version": "1.1"
}
}
Example 5 (Direct Download):
http://www.mediafire.com/api/1.1/file/get_links.php?quick_key=e6wzpz7hkiwq3m7&link_type=direct_download&session_token=a37cd44897687b2b8a35d4e03bc6739f525b9e4998d546ba67729e65d1b320bb390c350f38984c5f021421c0a44d1599ce5f7baf2875cf3976d7d3a9f2aa414c32542cb60d9744ec
<response>
<action>file/get_links</action>
<links>
<link>
<quickkey>e6wzpz7hkiwq3m7</quickkey>
<direct_download>
http://10.10.24.62/bh1b9qqny1sg/e6wzpz7hkiwq3m7/cliff-aliens-2.jpg
</direct_download>
</link>
</links>
<direct_download_free_bandwidth>0</direct_download_free_bandwidth>
<result>Success</result>
<current_api_version>1.1</current_api_version>
</response>
Example 6 (Direct Download, JSON):
http://www.mediafire.com/api/1.1/file/get_links.php?quick_key=e6wzpz7hkiwq3m7&link_type=direct_download&response_format=json&session_token=a37cd44897687b2b8a35d4e03bc6739f525b9e4998d546ba67729e65d1b320bb390c350f38984c5f021421c0a44d1599ce5f7baf2875cf3976d7d3a9f2aa414c32542cb60d9744ec
{
"response": {
"action": "file/get_links",
"links": [
{
"quickkey": "e6wzpz7hkiwq3m7",
"direct_download": "http://10.10.24.62/2jlguvwenxdg/e6wzpz7hkiwq3m7/cliff-aliens-2.jpg"
}
],
"direct_download_free_bandwidth": "0",
"result": "Success",
"current_api_version": "1.1"
}
}
Get Status
Description : Returns the status of a document or an image. This call is designed to bypass some of the more aggressive caching in order to provide a more effective and reliable polling target. Refer to 'Status property' section for more details.
Required Parameters:
- quick_key : The quickkey that identifies the file. You can also specify multiple quickkeys separated by commas. The maximum number of quickkeys allowed is 500.
Optional Parameters:
- session_token : A type 1 or type 2 session token. (Type 2 will require a call signature).
- response_format : 'xml' or 'json' (default 'xml')
Example:
http://www.mediafire.com/api/1.1/file/get_status.php?session_token=ab951de178b31957f16a769ea69b58b5bf33f6b1bc03077c99d79d8605ed9a1e45b7edf2a9952fe18fd512bce0fa2d4f1fc1ee92215f33700be424d184e3637ca15a90108a2813fe&quick_key=p72btpmf38j5j05
<response>
<action>file/get_status</action>
<file_status>
<quickkey>p72btpmf38j5j05</quickkey>
<status/>
</file_status>
<result>Success</result>
<current_api_version>1.0</current_api_version>
</response>
Get Versions
Description : Returns a list of all file versions.
Required Parameters:
- session_token : A type 1 or type 2 session token. (Type 2 will require a call signature).
- quick_key : The quickkey that identifies the file.
Optional Parameters:
- signature : This is the call signature that is required to authenticate a type 2 session token transaction.
- response_format : 'xml' or 'json' (default 'xml')
Response Properties
- revision: The revision of the file
- date: The date and time the file was
- head: Indicates if the file is the latest version. 'yes' or 'no'
- result: Indicates if the API call was successful: 'Success' or 'Error'
- current_api_version: The API version
- new_key: Indicates if a new key was created. 'yes' or 'no'
- message: Error message for supplying a bad session token: 'The supplied Session Token is expired or invalid'
- error: Error number for a supplying a bad session token: '105'
Example:
http://www.mediafire.com/api/1.1/file/get_versions.php?session_token=11e9322290284ce58b3f80e9d897a18eb3737e80d0202def2983d02887fff8ccec01b1046e064beeefc94ab118c2531d34f316e4e5567da064cf73d35af55012d6e4e3ba22e0c142&quick_key=h8rhtpjx9za16cb
<response>
<action>file/get_versions</action>
<file_versions>
<file_version>
<revision>50035</revision>
<date>2011-10-25 14:28:03</date>
</file_version>
<file_version>
<revision>50034</revision>
<date>2011-10-25 14:28:03</date>
</file_version>
<file_version>
<revision>50033</revision>
<date>2013-06-25 14:53:11</date>
</file_version>
</file_versions>
<result>Success</result>
<current_api_version>1.1</current_api_version>
</response>
Move
Description : Move a file, or list of files, to a folder.
Required Parameters:
- session_token : A type 1 or type 2 session token. (Type 2 will require a call signature).
- quick_key : The quickkey, or a list of quickkeys, that identify the file(s) to be moved. Quickkeys must be separated by commas. The maximum number of quickkeys allowed is 500.
Optional Parameters:
- signature : This is the call signature that is required to authenticate a type 2 session token transaction.
- folder_key : The folderkey that identifies the destination folder. If omitted, the destination folder will be the root folder (My Files).
- response_format : 'xml' or 'json' (default 'xml')
Response Properties
- revision: The revision of the file
- epoch: [deprecated]
- device_revision: The device revision
- result: Indicates if the API call was successful: 'Success' or 'Error'
- current_api_version: The API version
- new_key: Indicates if a new key was created. 'yes' or 'no'
Error Responses From Supplying a Bad Session Token:
- message: Error message for supplying a bad session token: 'The supplied Session Token is expired or invalid'
- error: Error number for a supplying a bad session token: '105'
Error Responses for Supplying a Bad Quickkey:
- message: Error message for supplying a bad quickkey: 'Unknown or Invalid QuickKey'
- error: Error number for a supplying a bad quickkey: '110'
Example:
http://www.mediafire.com/api/1.1/file/move.php?session_token=11e9322290284ce58b3f80e9d897a18eb3737e80d0202def2983d02887fff8ccec01b1046e064beeefc94ab118c2531d34f316e4e5567da064cf73d35af55012d6e4e3ba22e0c142&quick_key=08iqaa1a492vf1v&folder_key=l0g2q7xz3ga6m
<response>
<action>file/move</action>
<myfiles_revision>
<revision>243.5</revision>
<epoch>1360959064</epoch>
</myfiles_revision>
<result>Success</result>
<current_api_version>1.1</current_api_version>
</response>
One Time Download
Functionality Scenarios
Notes
- If bind_ip is not set and passed, the system automatically sets burn_after_use to 'yes' (this setting is not changeable in this scenario). It is not necessary to set or pass burn_after_use in the API call.
- If bind_ip is set and passed, burn_after_use allows the caller to decide whether the link should be invalidated after its first use or remain usable.
Required Parameters
- session_token : A type 1 or type 2 session token. (Type 2 will require a call signature).
Relative Parameters
- burn_after_use : Configurable only if bind_ip is set & passed. Determines if the one-time link should be invalidated after first use. Values: yes | no [default].
- signature : This is the call signature that is required to authenticate a type 2 session token transaction.
- quick_key : The quickkey of the file to generate the one-time download link. If 'quick_key' is not passed, no link is generated, and the daily limit will be returned.
- get_counts_only : If set to 'yes', only the daily request counts will be returned. No link is generated.
- duration : The number of minutes this link is valid. If not passed, then the link expires after 30 days.
- email_notification : Indicates whether or not to send an email notification to the file owner. 'yes' or 'no. (default 'no').
- success_callback_url : An absolute URL which is called when the user successfully downloads the file.
- error_callback_url : An absolute URL which is called when the download fails.
- bind_ip : An IP mask/range or a comma-separated list of IP masks/ranges to restrict the download to matching user's IP addresses. (e.g. '68.154.11.0/8, 145.230.230.115-145.230.240.33, 78.192.10.10').
- response_format : 'xml' or 'json' (default 'xml')
Example:
http://www.mediafire.com/api/1.1/file/one_time_download.php?session_token=3f643fbbda95b7dfc4a094927a8bb23cde7bc64481f015eabca2559ae1835984c85566f97882e4c598e5702f556064e22bb9e8f6b9d12a67a7bd74e4bdd553c958e489572cd0d1fc&quick_key=kefnlyjopexkaae&duration=3600&email_notification=yes&success_callback_url=http://someurl.com
<response>
<action>file/one_time_download</action>
<one_time_download_request_count>1</one_time_download_request_count>
<one_time_download_request_max_count>5000</one_time_download_request_max_count>
<one_time_download>http://www.mediafire.com/?48z0b1awog9jyfrgxcr46kkwu3vsrer</one_time_download>
<token>48z0b1awog9jyfrgxcr46kkwu3vsrer</token>
<result>Success</result>
<current_api_version>1.0</current_api_version>
</response>
One Time Key
Notes: API name change from file/one_time_download. Additionally, one-time-keys now support the generation of one-time keys for document viewing.
Description: Creates a one-time download key. A one-time download key is a download key that can only be used by one recipient, which can be further restricted to a specific IP address (bind_ip). Once it has been used it can optionally be destroyed after use (burn_after_use).
Required Parameters
- session_token : A type 1 or type 2 session token. (Type 2 will require a call signature).
Relative Parameters
- burn_after_use : Configurable only if bind_ip is set & passed. Determines if the one-time link should be invalidated after first use. Values: yes | no [default].
- signature : This is the call signature that is required to authenticate a type 2 session token transaction.
Optional Parameters
- quick_key : The quickkey of the file to generate the one-time download link. If 'quick_key' is not passed, no link is generated, and the daily limit will be returned.
- get_counts_only : If set to 'yes', only the daily request counts will be returned. No link is generated.
- duration : The number of minutes this link is valid. If not passed, then the link expires after 30 days.
- email_notification : Indicates whether or not to send an email notification to the file owner. 'yes' or 'no. (default 'no').
- success_callback_url : An absolute URL which is called when the user successfully downloads the file.
- error_callback_url : An absolute URL which is called when the download fails.
- bind_ip : An IP mask/range or a comma-separated list of IP masks/ranges to restrict the download to matching user's IP addresses. (e.g. '68.154.11.1/8, 145.230.230.115-145.230.240.33, 78.192.10.10').
- response_format : 'xml' or 'json' (default 'xml')
Functionality Scenarios
- If bind_ip is not set and passed, the system automatically sets burn_after_use to 'yes' (this setting is not changeable in this scenario). It is not necessary to set or pass burn_after_use in the API call.
- If bind_ip is set and passed, burn_after_use allows the caller to decide whether the link should be invalidated after its first use or remain usable.
Response Properties
- one_time_download_request_count: How many one-time links the session user has requested in a 24 hour period. Only returned when a one-time link is successfully returned.
- result: Indicates if the API call was successful: 'Success' or 'Error'
- current_api_version: The API version
- direct_download_free_bandwidth: The amount of free bandwidth the session user has consumed in the current 24 hour period. Users receive 50GB of free bandwidth every 24 hours. Only returned when a direct link is successfully returned.
- message: Error message for supplying a bad session token: 'The supplied Session Token is expired or invalid'
- error: Error number for a supplying a bad session token: '105'
Error Returned for a Link that in Unavailable
- edit_error_message: Returned in place of an edit link when an edit link is unavailable: 'User lacks edit permissions' or 'File is not editable
- one_time_download_error_message: Returned in place of an edit link when an edit link is unavailable. 'User is not authenticated,' 'No session token provided,' 'Daily limit for one-time download links exceeded,' 'Link unavailable,
- direct_download_error: Returned in place of a direct link when the direct link is unavailable. '40,' '41,' '44,' '45'.
- direct_download_error_message: Holds the error message text of the error codes returned by direct_download_error. 'Link unavailable,' 'Account suspended,' 'Insufficient bandwidth,' 'Insufficient Permissions'
Example:
http://www.mediafire.com/api/file/one_time_download.php?session_token=3f643fbbda95b7dfc4a094927a8bb23cde7bc64481f015eabca2559ae1835984c85566f97882e4c598e5702f556064e22bb9e8f6b9d12a67a7bd74e4bdd553c958e489572cd0d1fc&quick_key=kefnlyjopexkaae&duration=3600&email_notification=yes&success_callback_url=http://someurl.com
<response>
<action>file/one_time_download</action>
<one_time_download_request_count>1</one_time_download_request_count>
<one_time_download_request_max_count>5000</one_time_download_request_max_count>
<one_time_download>http://www.mediafire.com/?48z0b1awog9jyfrgxcr46kkwu3vsrer</one_time_download>
<token>48z0b1awog9jyfrgxcr46kkwu3vsrer</token>
<result>Success</result>
<current_api_version>1.1</current_api_version>
</response>
Purge
Description : Permanently delete a user's file.
Required Parameters:
- session_token : A type 1 or type 2 session token. (Type 2 will require a call signature).
- quick_key : The quickkey, or a list of quickkeys separated by commas, that identify the files to be purged. The maximum number of quickkeys allowed is 500.
Optional Parameters:
- signature : This is the call signature that is required to authenticate a type 2 session token transaction.
- response_format : 'xml' or 'json' (default 'xml')
Response Properties
- device_revision: The revision of the device
- result: Indicates if the API call was successful: 'Success' or 'Error'
- current_api_version: The API version
- new_key: Indicates if a new key was created. 'yes' or 'no'
Error Responses for Supplying a Bad Quickkey:
- message: Error message for supplying a bad quickkey: 'Unknown or Invalid QuickKey'
- error: Error number for a supplying a bad quickkey: '110'
Error Responses From Supplying a Bad Session Token:
- message: Error message for supplying a bad session token: 'The supplied Session Token is expired or invalid'
- error: Error number for a supplying a bad session token: '105'
Example:
http://www.mediafire.com/api/1.1/file/purge.php?session_token=11e9322290284ce58b3f80e9d897a18eb3737e80d0202def2983d02887fff8ccec01b1046e064beeefc94ab118c2531d34f316e4e5567da064cf73d35af55012d6e4e3ba22e0c142&quick_key=h8rhtpjx9za16cb
<response>
<action>file/delete</action>
<myfiles_revision>
<revision>243.4</revision>
<epoch>1360959064</epoch>
</myfiles_revision>
<result>Success</result>
<current_api_version>1.1</current_api_version>
</response>
Recently Modified
Description : Returns a list of quickkeys of the recently modified files.
Required Parameters:
- session_token :(needed only when accessing root folder, private folder, or the folder's private content) A type 1 or type 2 session token. (Type 2 will require a call signature).
Optional Parameters:
- signature : This is the call signature that is required to authenticate a type 2 session token transaction.
- number_of_files : Indicates the number of quickkeys to be returned.
- response_format : 'xml' or 'json' (default 'xml')
Response Properties
- quickkey: The quickkey of the file which was revised. This property will repeat until the number specified in the optional parameter is reached.
- result: Indicates if the API call was successful: 'Success' or 'Error'
- current_api_version: The API version
- new_key: Indicates if a new key was created. 'yes' or 'no'
Error Responses From Supplying a Bad Session Token:
- message: Error message for supplying a bad session token: 'The supplied Session Token is expired or invalid'
- error: Error number for a supplying a bad session token: '105'
Example:
http://www.mediafire.com/api/1.1/file/recently_modified.php?session_token=3f643fbbda95b7dfc4a094927a8bb23cde7bc64481f015eabca2559ae1835984c85566f97882e4c598e5702f556064e22bb9e8f6b9d12a67a7bd74e4bdd553c958e489572cd0d1fc
<response>
<action>file/recently_modified</action>
<quickkeys>
<quickkey>pk6wac3kn4hqs6h</quickkey>
<quickkey>tg4vt34w0k9c0zb</quickkey>
<quickkey>ouyzeu9z52527yv</quickkey>
<quickkey>qjnkolnr7cjs137</quickkey>
<quickkey>x4aub1yln8h8ae8</quickkey>
<quickkey>qz5talh1ay6a8h3</quickkey>
<quickkey>k44s7l2ybympf13</quickkey>
<quickkey>2gurwo528sbf63e</quickkey>
<quickkey>6ypjovee3urtscm</quickkey>
<quickkey>pmohk1mdjdd08mw</quickkey>
</quickkeys>
<result>Success</result>
<current_api_version>1.1</current_api_version>
</response>
Restore
Description : Restores an old file revision and makes it the current head.
Required Parameters:
- session_token : A type 1 or type 2 session token. (Type 2 will require a call signature).
- quick_key : The quickkey that identifies the file to be restored.
- revision : The revision to restore the file to.
Optional Parameters:
- signature : This is the call signature that is required to authenticate a type 2 session token transaction.
- response_format : 'xml' or 'json' (default 'xml')
Response Properties
- asynchronous: This property tells whether the request is being processed real-time. If the job is processed asynchronously, callers will need to poll device/get_status to determine when their job is complete. 'yes' or 'no'
- result: Indicates if the API call was successful: 'Success' or 'Error'
- current_api_version: The API version
- new_key: Indicates if a new key was created. 'yes' or 'no'
Error Responses for Supplying a Bad Quickkey:
- message: Error message for supplying a bad quickkey: 'Unknown or Invalid QuickKey'
- error: Error number for a supplying a bad quickkey: '110'
Error Responses for Supplying a Bad Revision Number:
- message: Error message for supplying a bad revision number: 'The revision you requested is invalid or cannot be restored'
- error: Error number for a supplying a bad revision number: '223'
Error Responses From Supplying a Bad Session Token:
- message: Error message for supplying a bad session token: 'The supplied Session Token is expired or invalid'
- error: Error number for a supplying a bad session token: '105'
Example:
http://www.mediafire.com/api/1.1/file/restore.php?session_token=11e9325290284ce58b3f80e9d897a18eb3737e80d0202def2983d02887fff8ccec01b1046e064beeefc94ab118c2531d34f316e4e5567da064cf73d35af55012d6e4e3ba22e0c142&quick_key=h8rhtpjx9za16cb&revision=50393
<response>
<action>file/restore</action>
<asynchronous>yes</asynchronous>
<result>Success</result>
<current_api_version>1.1</current_api_version>
</response>
Set Flags
Deprecated. Use file/update instead.
Description : Sets the bits in the file's flags.
Required Parameters:
- session_token :(needed only when accessing user's private files) A type 1 or type 2 session token. (Type 2 will require a call signature).
- quick_key : The quickkey that identifies the file. You can also specify multiple quickkeys separated by commas. The maximum number of quickkeys allowed is 500.
- bit : The number of the bit to modify (starting from 0).
- value : The value to set the above bit to. It can only take the value 0 or 1.
Optional Parameters:
- signature : This is the call signature that is required to authenticate a type 2 session token transaction.
- response_format : 'xml' or 'json' (default 'xml')
Example:
http://www.mediafire.com/api/1.1/file/set_flags.php?session_token=50adfd2c3ccb2246d8997840c54e986fbb8f5f445df069c5e474136640944272190551be7c816ed70bd4f4853a874e7df519987210dcd9daa160f61ef1841b9c7dda380bad84886b&quick_key=h8w6sywa7yfrc1z&bit=0&value=1
<response>
<action>file/set_flags</action>
<device_revision>123</device_revision>
<deprecated>yes</deprecated>
<result>Success</result>
<current_api_version>1.0</current_api_version>
</response>
Update
Description : Update a file's information.
Note: The following optional APIs were deprecated: note_subject, note_description, tags.
Required Parameters:
- session_token : A type 1 or type 2 session token. (Type 2 will require a call signature).
- quick_key : The quickkey that identifies the file.
Relative Parameters:
- signature : This is the call signature that is required to authenticate a type 2 session token transaction.
Optional Parameters:
- filename : The name and mimetype extensions of the file (Should have same file type as the old file). The filename should be 3 to 255 in length. Mime type extension values: 'txt'.
- description : The description of the file.
- 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
- privacy : Privacy of the file ('public' or 'private')
- response_format : 'xml' or 'json' (default 'xml')
Response Properties
- revision: The revision of the file
- epoch: deprecated
- device_revision: The device revision
- result: Indicates if the API call was successful: 'Success' or 'Error'
- current_api_version: The API version
- new_key: Indicates if a new key was created. 'yes' or 'no'
Error Responses for Supplying a Bad File name:
- message: Error message for supplying a bad file name: 'The File Name specified is invalid'
- error: Error number for a supplying a bad file name: '118'
Error Responses From Supplying a Bad Session Token:
- message: Error message for supplying a bad session token: 'The supplied Session Token is expired or invalid'
- error: Error number for a supplying a bad session token: '105'
Example:
http://www.mediafire.com/api/1.1/file/update.php?session_token=11e9322290284ce58b3f80e9d897a18eb3737e80d0202def2983d02887fff8ccec01b1046e064beeefc94ab118c2531d34f316e4e5567da064cf73d35af55012d6e4e3ba22e0c142&quick_key=08iqaa1a492vf1v&filename=test_update_file&description=test_desc&privacy=private
<response>
<action>file/update</action>
<myfiles_revision>
<revision>243.6</revision>
<epoch>1360959064</epoch>
</myfiles_revision>
<device_revision>123</device_revision>
<result>Success</result>
<current_api_version>1.1</current_api_version>
</response>
Update File
Description : Update a file's quickkey with another file's quickkey.
Required Parameters:
- session_token : A type 1 or type 2 session token. (Type 2 will require a call signature).
- from_quickkey : The quickkey of the file to be overwritten. After this operation, this quickkey will be invalid.
- to_quickkey : The new quickkey that will point to the file previously identified by from_quickkey.
Optional Parameters:
- signature : This is the call signature that is required to authenticate a type 2 session token transaction.
- response_format : 'xml' or 'json' (default 'xml')
Response Properties
- revision: The revision of the file
- epoch: deprecated
- device_revision The revision of the device
- result: Indicates if the API call was successful: 'Success' or 'Error'
- current_api_version: The API version
Error Responses for Supplying a Bad Quickkey:
- message: Error message for supplying a bad quickkey: 'Unknown or Invalid QuickKey'
- error: Error number for a supplying a bad quickkey: '110'
Error Responses From Supplying a Bad Session Token:
- message: Error message for supplying a bad session token: 'The supplied Session Token is expired or invalid'
- error: Error number for a supplying a bad session token: '105'
Example:
http://www.mediafire.com/api/1.1/file/update_file.php?session_token=11e9322290284ce58b3f80e9d897a18eb3737e80d0202def2983d02887fff8ccec01b1046e064beeefc94ab118c2531d34f316e4e5567da064cf73d35af55012d6e4e3ba22e0c142&from_quickkey=08iqaa1a492vf1v&to_quickkey=hy8l46d39k8wb6z
<response>
<action>file/update</action>
<myfiles_revision>
<revision>243.6</revision>
<epoch>1360959064</epoch>
</myfiles_revision>
<result>Success</result>
<current_api_version>1.1</current_api_version>
</response>
Update Password
Deprecated. File-specific passwords are no longer in use.
Description : Update a file's password.
Required Parameters:
- session_token : A type 1 or type 2 session token. (Type 2 will require a call signature).
- quick_key : The quickkey that identifies the file.
- password : The new password to be set. To remove the password protection, pass an empty string.
Optional Parameters:
- signature : This is the call signature that is required to authenticate a type 2 session token transaction.
- response_format : 'xml' or 'json' (default 'xml')
Example:
http://www.mediafire.com/api/1.1/file/update_password.php?session_token=11e9322290284ce58b3f80e9d897a18eb3737e80d0202def2983d02887fff8ccec01b1046e064beeefc94ab118c2531d34f316e4e5567da064cf73d35af55012d6e4e3ba22e0c142&quick_key=08iqaa1a492vf1v&password=testchangepass
<response>
<action>file/update_file</action>
<myfiles_revision>
<revision>243.11</revision>
<epoch>1360959064</epoch>
</myfiles_revision>
<device_revision>123</device_revision>
<deprecated>yes</deprecated>
<result>Success</result>
<current_api_version>1.0</current_api_version>
</response>
Zip
Description : Bulk-download multiple files and folders into one single zip file.
Required Parameters:
- keys : a comma-separated list of quickkeys and folderkeys to be zipped.
Optional Parameters:
- session_token : A type 1 or type 2 session token. (Type 2 will require a call signature). The session token is needed only when:
- The session user wants to include private items when downloading owned files and folders, or
- If 'confirm_download' is set to 'yes', that is, when the session user wants to use their own bandwidth (if they are premium).
- confirm_download : Confirm the download using the session user's bandwidth, and only if the user is premium. 'yes' or 'no' (default 'no').
- meta_only : Only returns a json or xml response even on success. This will prevent returning the zip file back. 'yes' or 'no' (default 'no').
- response_format : 'xml' or 'json' (default 'xml')
Example (Success):
http://www.mediafire.com/api/1.1/file/zip.php?session_token=5335c97f17426e9a077cefcc5ee02d7a66b480ddabd34a76696ab9830f17d7f724bf44e4fb29ca5c2c023f9a4c9f3e9752aac7b29fa911faf0e577e94a84f7f1971ee51ff145968e&keys=dd9cmgl746p4p
Zip File will be automatically downloaded
Example 2 (Error 148):
http://www.mediafire.com/api/1.1/file/zip.php?session_token=5335c97f17426e9a077cefcc5ee02d7a66b480ddabd34a76696ab9830f17d7f724bf44e4fb29ca5c2c023f9a4c9f3e9752aac7b29fa911faf0e577e94a84f7f1971ee51ff145968e&keys=dd9cmgl746p4p
<response>
<action>file/update_password</action>
<myfiles_revision>
<revision>243.9</revision>
<epoch>1360959064</epoch>
</myfiles_revision>
<result>Success</result>
<current_api_version>1.1</current_api_version>
</response>
Example 3 (Error 151):
http://businessdomaintest.mediafire.com/api/1.1/file/zip.php?session_token=3f643fbbda95b7dfc4a094927a8bb23cde7bc64481f015eabca2559ae1835984c85566f97882e4c598e5702f556064e22bb9e8f6b9d12a67a7bd74e4bdd553c958e489572cd0d1fc&keys=ixskrduth0rgs
<response>
<action>file/zip</action>
<message>The item you selected contained no files. You must select at least one file to zip</message>
<error>151</error>
<result>Error</result>
<current_api_version>1.1</current_api_version>
</response>