System1.1

Get Editable Media


Description : Returns a list of all supported documents for editing.

Required Parameters

  • none

Optional Parameters
  • group_by_filetype : Groups lists by filetype 'yes' or 'no' (default 'no').
  • response_format : 'xml' or 'json' (default 'xml')


GET http://www.mediafire.com/api/1.1/system/get_editable_media.php
POST http://www.mediafire.com/api/1.1/system/get_editable_media.php

Response Properties
General Responses
  • extensions: The types of files which can be edited on MediaFire.
  • result: Indicates if the API call was successful. 'Error' or 'Success'
  • current_api_version: The API version

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 1 (defaults to not being grouped by filetype):

Request
http://www.mediafire.com/api/1.1/system/get_editable_media.php
Response:
<response>
    <action>system/get_editable_media</action>
    <editable>
        <extensions>
            <extension>doc</extension>
            <extension>docx</extension>
            <extension>rtf</extension>
            <extension>odt</extension>
            <extension>sxw</extension>
            <extension>html</extension>
            <extension>txt</extension>
            <extension>xls</extension>
            <extension>xlsx</extension>
            <extension>sxc</extension>
            <extension>ods</extension>
            <extension>csv</extension>
            <extension>tsv</extension>
            <extension>ppt</extension>
            <extension>pps</extension>
            <extension>odp</extension>
            <extension>sxi</extension>
        </extensions>
    </editable>
    <result>Success</result>
    <current_api_version>1.1</current_api_version>
</response>

Example 2 (group_by_file is set to yes):

Request
http://www.mediafire.com/api/1.1/system/get_editable_media.php?group_by_filetype=yes
Response:
<response>
    <action>system/get_editable_media</action>
    <editable>
        <document>
            <extensions>
                <extension>doc</extension>
                <extension>docx</extension>
                <extension>rtf</extension>
                <extension>odt</extension>
                <extension>sxw</extension>
                <extension>html</extension>
                <extension>txt</extension>
            </extensions>
        </document>
        <spreadsheet>
            <extensions>
                <extension>xls</extension>
                <extension>xlsx</extension>
                <extension>sxc</extension>
                <extension>ods</extension>
                <extension>csv</extension>
                <extension>tsv</extension>
            </extensions>
        </spreadsheet>
        <presentation>
            <extensions>
                <extension>ppt</extension>
                <extension>pps</extension>
                <extension>odp</extension>
                <extension>sxi</extension>
            </extensions>
        </presentation>
    </editable>
    <result>Success</result>
    <current_api_version>1.1</current_api_version>
</response>


Example 3 (group_by_filetype is set to no, JSON response):

Request
http://www.mediafire.com/api/system/get_editable_media.php?response_format=json

Response:
{
  "response": {
    "action": "system/get_editable_media",
    "editable": {
      "extensions": [
        "doc",
        "docx",
        "rtf",
        "odt",
        "sxw",
        "html",
        "txt",
        "xls",
        "xlsx",
        "sxc",
        "ods",
        "csv",
        "tsv",
        "ppt",
        "pps",
        "odp",
        "sxi"
      ]
    },
    "result": "Success",
    "current_api_version": "1.1"
  }
}

Get Info


Description: Returns all the configuration data about the MediaFire system.

Required Parameters:

  • none

Optional Parameters:
  • response_format : 'xml' or 'json' (default 'xml')

GET http://www.mediafire.com/api/1.1/system/get_info.php
POST http://www.mediafire.com/api/1.1/system/get_info.php

Response Properties
General Responses
  • timezone: The servers timezone.
  • timezone_offset: The server timezone offset, in seconds, from UTC.
  • image_sizes: The supported image sizes and the associated thumbnail designation for a particular image size.
  • viewable: File formats that can be viewed via MediaFire.
  • editable: File formats that can be edited via MediaFire.
  • terms_of_service: The most recent terms of service.
  • max_keys: The maximum number of resource keys allowed to be passed to file/get_info, file/copy, file/delete, file/move, folder/get_info, folder/copy, folder/delete, folder/move.
  • max_objects: The maximum number of results that can be returned by folder/get_siblings.
  • max_image_size: The maximum file size, in bytes, of an image to be uploaded.
  • result: Indicates if the API call was successful. 'Error' or 'Success'
  • current_api_version: The API version

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:

Request
http://www.mediafire.com/api/1.1/system/get_info.php
Response
<response>
    <action>system/get_info</action>
    <timezone>America/Chicago</timezone>
    <timezone_offset>-21600</timezone_offset>
    <image_sizes>
        <image_size>
            <width>32</width>
            <height>32</height>
            <thumbnail>0</thumbnail>
        </image_size>
        <image_size>
            <width>107</width>
            <height>80</height>
            <thumbnail>1</thumbnail>
        </image_size>
        ...
    </image_sizes>     <viewable>         <extensions>             <extension>json</extension>             <extension>doc</extension>             <extension>pdf</extension>             ...
        </extensions>     </viewable>     <editable>         <extensions>             <extension>json</extension>             <extension>doc</extension>             <extension>rtf</extension>             ...
        </extensions>     </editable>     <terms_of_service>         <revision>3.2</revision>         <terms>...</terms>         <date>2013-11-01 17:09:06</date>     </terms_of_service>     <max_keys>500</max_keys>     <max_objects>6000</max_objects>     <max_image_size>26214400</max_image_size>     <result>Success</result>     <current_api_version>1.1</current_api_version> </response>

Example 2 (JSON Response):

Request
http://www.mediafire.com/api/system/get_info.php?response_format=json

Response
{
  "response": {
    "action": "system/get_info",
    "timezone": "America/Chicago",
    "timezone_offset": "-21600",
    "image_sizes": [
      {
        "width": "32",
        "height": "32",
        "thumbnail": "0"
      },
      {
        "width": "107",
        "height": "80",
        "thumbnail": "1"
      },
      ...
    ],
    "viewable": {
      "extensions": [
        "json",
        "doc",
        "pdf",
        ...
      ]
    },
    "editable": {
      "extension": [
        "json",
        "doc",
        "rtf",
        ...
      ]
    },
    "terms_of_service": {
      "revision": "3.2",
      "terms": ...,
      "date": "2013-11-01 17:09:06"
    },
    "max_keys": "500",
    "max_objects": "6000",
    "max_image_size": "26214400",
    "result": "Success",
    "current_api_version": "1.1"
  }
}

Get Limits


Notes: Obsolete response property daily_shares_limit removed.

Description: Returns a list of various limits that the API honors.

Required Parameters:

  • none

Optional Parameters:
  • response_format : 'xml' or 'json' (default 'xml')

GET http://www.mediafire.com/api/1.1/system/get_limits.php
POST http://www.mediafire.com/api/1.1/system/get_limits.php

Response Properties
General Responses
  • max_keys: The maximum number of resource keys allowed to be passed to file/get_info, file/copy, file/delete, file/move, folder/get_info, folder/copy, folder/delete, folder/move.
  • max_objects: The maximum number of results that can be returned by folder/get_siblings.
  • max_image_size: The maximum file size, in bytes, of an image to be uploaded.
  • zip_max_filesize: The maximum file size, in bytes, of a file to be added to a zip container.
  • zip_max_total_filesize: The maximum file size of the zip container.
  • folder_content_chunk_size: The maximum number of items returned by folder/get_content.
  • folder_depth_limit: The maximum number of chain folders returned by folder/get_depth.
  • limit_search_results: The maximum number of search results returned by folder/search.
  • device_changes_list_limit: The maximum number of changes returned by device/get_changes.
  • total_folder_items_limit: The maximum number of items the system will process synchronously.
  • result: Indicates if the API call was successful. 'Error' or 'Success'
  • current_api_version: The API version

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:

Request
http://www.mediafire.com/api/1.1/system/get_limits.php?session_token=d3d60e59f2cc54457c724677eb73d4588d5f7dafdc7c9e34eb21ab67bf2b707f1d73b91e08347c9fb05193454f2ed5d304d0642d730f8e404e5781e0f1c69f17dda9fd40b9dc814d
Response
<response>
    <action>system/get_limits</action>
    <limits>
        <max_objects>6000</max_objects>
        <max_keys>500</max_keys>
        <max_image_size>26214400</max_image_size>
        <zip_max_filesize>314572800</zip_max_filesize>
        <zip_max_total_filesize>2147483647</zip_max_total_filesize>
        <folder_content_chunk_size>100</folder_content_chunk_size>
        <folder_depth_limit>20</folder_depth_limit>
        <limit_search_results>100</limit_search_results>
        <daily_shares_limit>100</daily_shares_limit>
        <device_changes_list_limit>500</device_changes_list_limit>
    </limits>
    <result>Success</result>
    <current_api_version>1.1</current_api_version>
</response>

Get Mime Types


Description: Returns a list of file extensions, their document type, and their mime types.

Required Parameters:

  • none

Optional Parameters:
  • response_format : 'xml' or 'json' (default 'xml')


GET www.mediafire.com/api/1.1/system/get_mime_types.php
POST www.mediafire.com/api/1.1/system/get_mime_types.php

Response Properties
General Responses
  • mimetype: The MIME data type information.
  • extension: The file extension associated with this MIME data type. More than one extension can be associated with a single MIME data type so there may multiple entries in the response for a particular MIME data type.
  • type: The broad type/category of the file. unknown, image, video, audio, document, application, archive, data, development, spreadsheet, presentation.
  • 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. 'Error' or 'Success'
  • current_api_version: The API version

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:

Request
http://www.mediafire.com/api/1.1/user/get_info.php?session_token=123456789012345678901234567890123456789012345678901234567890&version=1
Response
<response>
    <action>system/get_mime_types</action>
    <mime_types>
        <mime_type>
            <extension>.3dm</extension>
            <category>other</category>
            <type>application/world</type>
        </mime_type>
        <mime_type>
                    <extension>.3dmf</extension>
                    <category>other</category>
                    <type>application/world</type>
            </mime_type>
            <mime_type>
                    <extension>.3g2</extension>
                    lt;category>video</category>
                    <type>video/3gp2</type>
            </mime_type>
            <mime_type>
                    <extension>.3gp</extension>
                    <category>video</category>
                    <type>video/3gpp</type>
            </mime_type>
            <mime_type>
                    <extension>.a</extension>
                    <category>other</category>
                    <type>application/octet-stream</type>
            </mime_type>
            <mime_type>
                    <extension>.aab</extension>
                    <category>other</category>
                    <type>application/authorware-bin</type>
            </mime_type>
            . . .
            <mime_type>
                    <extension>.zsh</extension>
                    <category>text</category>
                    <type>text/script.zsh</type>
            </mime_type>
    </mime_types>
    <result>Success</result>
    <current_api_version>1.1</current_api_version>
</response>

Get Status


Description: Returns the current state of the cloud infrastructure.

Required Parameters:

  • none

Optional Parameters:
  • response_format : 'xml' or 'json' (default 'xml')


GET http://www.mediafire.com/api/1.1/system/get_status.php
POST http://www.mediafire.com/api/1.1/system/get_status.php

Response Properties
General Responses
  • database: Boolean that indicates if the database is 1 [Online] or 2 [Offline or slow].
  • memcache: Boolean that indicates if the memory cache servers are 1 [Online] or 2 [Offline or slow].
  • result: Indicates if the API call was successful. 'Error' or 'Success'
  • current_api_version: The API version

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:

Request
http://www.mediafire.com/api/1.1/system/get_status.php
Response
<response>
    <action>system/get_status</action>
    <database>1</database>
    <memcache>1</memcache>
    <result>Success</result>
    <current_api_version>1.1</current_api_version>
</response>

1 = online, 0 = offline or slow to respond


Get Supported Media


Description : Returns the list of all supported document types for preview.

Required Parameters:

  • none

Optional Parameters:
  • group_by_filetype : groups lists by filetype 'yes' or 'no' (default 'no').
  • response_format : 'xml' or 'json' (default 'xml')


GET http://www.mediafire.com/api/1.1/system/get_supported_media.php
POST http://www.mediafire.com/api/1.1/system/get_supported_media.php

Response Properties
General Responses
  • extensions: The types of files which are supported on MediaFire.
  • result: Indicates if the API call was successful. 'Error' or 'Success'
  • current_api_version: The API version

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 1 (defaults to not being grouped by filetype):


Request
http://www.mediafire.com/api/1.1/system/get_supported_media.php
Response
<response>
    <action>system/get_supported_media</action>
    <viewable>
        <extensions>
            <extension>bmp</extension>
            <extension>jpeg</extension>
            <extension>jpg</extension>
                  ...
                  ...
            </extensions>
    </viewable>
    <result>Success</result>
    <current_api_version>1.1</current_api_version>
</response>

Example 2 (group_by_filetype is set to yes):

Request
http://www.mediafire.com/api/1.1/system/get_supported_media.php?group_by_filetype=yes
Response
<response>
    <action>system/get_supported_media</action>
    <viewable>
        <image>
            <extensions>
                 <extension>bmp</extension>
                 <extension>jpeg</extension>
                        ...
                        ...
            </extensions>
            </image>
            <document>
                 <extensions>
                    <extension>doc</extension>
                    <extension>dot</extension>
                         ...
                         ...
                    </extensions>
            </document>
            <spreadsheet>
                <extensions>
                    <extension>xls</extension>
                    <extension>xlw</extension>
                         ...
                         ...
                </extensions>
            </spreadsheet>
            <presentation>
                <extensions>
                    <extension>ppt</extension>
                    <extension>pps</extension>
                         ...
                         ...
                    </extensions>
            </presentation>
        </viewable>
    <result>Success</result>
    <current_api_version>1.1</current_api_version>
</response>

Get Version


Description : Returns the current API version (major.minor).

Required Parameters:

  • none:

Optional Parameters:
  • response_format : 'xml' or 'json' (default 'xml')


GET http://www.mediafire.com/api/1.1/system/get_version.php
POST http://www.mediafire.com/api/1.1/system/get_version.php

Response Properties
General Responses
  • result: Indicates if the API call was successful. 'Error' or 'Success'
  • current_api_version: The API version

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:

Request
http://www.mediafire.com/api/1.1/system/get_version.php
Response
<response>
    <action>system/get_version</action>
    <current_api_version>1.1</current_api_version>
    <result>Success</result>
</response>