User1.1

Accept Terms of Service


Description: Accepts the Terms of Service by sending the acceptance token.

Required Parameters


Relative Parameters
  • 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')


GET http://www.mediafire.com/api/1.1/user/accept_tos.php
POST http://www.mediafire.com/api/1.1/user/accept_tos.php

Response Properties
  • result: Signifies if the API call was successful: 'Error or Success'
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/accept_tos.php?session_token=ab951de178b31957f16a769ea69b58b5bf33f6b1bc03077c99d79d8605ed9a1e45b7edf2a9952fe18fd512bce0fa2d4f1fc1ee92215f33700be424d184e3637ca15a90108a2813fe&acceptance_token=331a1777f6af415b5f46f6fc0772e9fc
Response
<response>
  <action>user/accept_tos</action>
  <result>Success</result>
</response>

Accept Terms of Service


Description: Accepts the Terms of Service by sending the acceptance token.

Required Parameters


Relative Parameters
  • 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')


GET http://www.mediafire.com/api/1.1/user/accept_tos.php
POST http://www.mediafire.com/api/1.1/user/accept_tos.php

Response Properties
  • result: Signifies if the API call was successful: 'Error or Success'
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/accept_tos.php?session_token=ab951de178b31957f16a769ea69b58b5bf33f6b1bc03077c99d79d8605ed9a1e45b7edf2a9952fe18fd512bce0fa2d4f1fc1ee92215f33700be424d184e3637ca15a90108a2813fe&acceptance_token=331a1777f6af415b5f46f6fc0772e9fc
Response
<response>
  <action>user/accept_tos</action>
  <result>Success</result>
</response>

Destroy Action Token


Description: Causes an existing action token to immediately expire.

Required Parameters


Relative Parameters
  • 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')


GET http://www.mediafire.com/api/1.1/user/destroy_action_token.php
POST http://www.mediafire.com/api/1.1/user/destroy_action_token.php

Response Properties
  • result: Signifies if the API call was successful: 'Error or Success'
Error Responses From Supplying an Action Token that has Previously Been Destroyed or is Invalid for Other Reasons:
  • message: Error message: 'Internal server error'
  • error: Error number: '100'

Example:

Request
https://www.mediafire.com/api/1.1/user/destroy_action_token.php?session_token=e6829fe5892012154097c19ed0635741a6269cbe5dec2a5ae600b2d70e64b45afd03e00cd15ca0d8d17c2348933894db1ef00dda21bd098d6ba1f51f5e82f7a1a28b454f1bd399ae&action_token=3bbdb91e5d8e171c6943736da69843b882130b2f0cf19189f7b927c712c06c834ab0d2bd0c7424a6c7fdedd6dea970f1132820cbfcaa8cd078dddfe662cda71f4a4dc4d4d89ea13e
Response
<response>
  <action>user/destroy_action_token</action>
  <result>Success</result>
  <current_api_version>1.1</current_api_version>
</response>

Fetch Terms Of Service


Description: Returns the HTML format of the MediaFire Terms of Service and its revision number, date, whether the user has accepted it not not, and the acceptance token (if the user has not accepted the latest terms).

Required Parameters:


Relative Parameters
  • 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')


      GET http://www.mediafire.com/api/1.1/user/fetch_tos.php
      POST http://www.mediafire.com/api/1.1/user/fetch_tos.php

      Response Properties
      • revision: The version of the Terms of Service
      • terms: The complete Terms of Service
      • date: The date and time the current TOS text was created
      • user_accepted_terms: Whether or not the user previously accepted the terms of service. no or yes.
      • acceptance_token: The acceptance token which is needed for user/accept_tos
      • result: Indicates if the API call was successful. 'Error' or 'Success'.
      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/fetch_tos.php?session_token=ab951de178b31957f16a769ea69b58b5bf33f6b1bc03077c99d79d8605ed9a1e45b7edf2a9952fe18fd512bce0fa2d4f1fc1ee92215f33700be424d184e3637ca15a90108a2813fe
      
      Response
      <response>
        <action>user/fetch_tos</action>
        <terms_of_service>
        <revision>0.11</revision>
        <Term of Service Example Text</terms>
        <date>2013-01-25 12:22:28</date>
        <user_accepted_terms>yes</user_accepted_terms>
        <acceptance_tokens>331a1777f6af415b5f46f6fc0772e9fc</acceptance_tokens>
        </terms_of_service>
        <result>Success</result>
        <current_api_version>1.1</current_api_version>
      </response>

      Fetch Terms Of Service


      Description: Returns the HTML format of the MediaFire Terms of Service and its revision number, date, whether the user has accepted it not not, and the acceptance token (if the user has not accepted the latest terms).

      Required Parameters:


      Relative Parameters
      • 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')


          GET http://www.mediafire.com/api/1.1/user/fetch_tos.php
          POST http://www.mediafire.com/api/1.1/user/fetch_tos.php

          Response Properties
          • revision: The version of the Terms of Service
          • terms: The complete Terms of Service
          • date: The date and time the current TOS text was created
          • user_accepted_terms: Whether or not the user previously accepted the terms of service. no or yes.
          • acceptance_token: The acceptance token which is needed for user/accept_tos
          • result: Indicates if the API call was successful. 'Error' or 'Success'.
          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/fetch_tos.php?session_token=ab951de178b31957f16a769ea69b58b5bf33f6b1bc03077c99d79d8605ed9a1e45b7edf2a9952fe18fd512bce0fa2d4f1fc1ee92215f33700be424d184e3637ca15a90108a2813fe
          
          Response
          <response>
            <action>user/fetch_tos</action>
            <terms_of_service>
            <revision>0.11</revision>
            <Term of Service Example Text</terms>
            <date>2013-01-25 12:22:28</date>
            <user_accepted_terms>yes</user_accepted_terms>
            <acceptance_tokens>331a1777f6af415b5f46f6fc0772e9fc</acceptance_tokens>
            </terms_of_service>
            <result>Success</result>
            <current_api_version>1.1</current_api_version>
          </response>

          Get Action Token


          Description: Generates a temporary action token that is specific to one type of request specified by the parameter type. Action Token is to be used in place of a session token in subsequent API requests. Because the session token lasts only 10 minutes, and the session token version 2 requires a signature for every call, Action Token cannot be used in certain operations. The Action Token can then be sent in lieu of the session token for authentication. It can also be destroyed after its use by calling user/destroy_action_token.

          Required Parameters:

          • session_token : A type 1 or type 2 session token. (Type 2 will require a call signature).
          • type : The type of action to be performed. Options are 'image' or 'upload'.

          Relative Parameters:
          • signature : This is the call signature that is required to authenticate a type 2 session token transaction.

          Optional Parameters:
          • lifespan : The number of minutes before the action token should be destroyed. Defaults to 1. 24-hour limit.
          • response_format : 'xml' or 'json' (default 'xml')


          GET http://www.mediafire.com/api/1.1/user/get_action_token.php
          POST http://www.mediafire.com/api/1.1/user/get_action_token.php

          Response Properties
          • action_token: The action token needed for user/destory_action_token
          • result: Indicates if the API call was successful. 'Error' or 'Success'
          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:

          Request
          http://www.mediafire.com/api/1.1/user/get_action_token.php?session_token=e6829fe5892012154097c19ed0635741a6269cbe5dec2a5ae600b2d70e64b45afd03e00cd15ca0d8d17c2348933894db1ef00dda21bd098d6ba1f51f5e82f7a1a28b454f1bd399ae&type=image&lifespan=600
          
          Response
          <response>
            <action>user/get_action_token</action>
            <action_token>
              3bbdb91e5d8e171c6943736da69843b882130b2f0cf19189f7b927c712c06c834ab0d2bd0c7424a6c7fdedd6dea970f1132820cbfcaa8cd078dddfe662cda71f4a4dc4d4d89ea13e
            </action_token>   <result>Success</result>   <current_api_version>1.1</current_api_version> </response>

          Example 2 (calling the conversion server):

          Request
          http://www1.mediafire.com/convkey/6801/6qnke22edaz9ds3fg.jpg?size_id=c&session_token=3bbdb91e5d8e171c6943736da69843b882130b2f0cf19189f7b927c712c06c834ab0d2bd0c7424a6c7fdedd6dea970f1132820cbfcaa8cd078dddfe662cda71f4a4dc4d4d89ea13e
          
          

          Get Avatar


          Description: Returns the URL of the operating user's avatar image.

          Required Parameters:


          Relative Parameters
          • 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
          GET http://www.mediafire.com/api/1.1/user/get_avatar.php
          POST http://www.mediafire.com/api/1.1/user/get_avatar.php

          • avatar: Reveals the URL for the avatar
          • result: Indicates if the API call was successful. 'Error' or 'Success'.
          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_avatar.php?session_token=e6829fe5892012154097c19ed0635741a6269cbe5dec2a5ae600b2d70e64b45afd03e00cd15ca0d8d17c2348933894db1ef00dda21bd098d6ba1f51f5e82f7a1a28b454f1bd399ae
          Response
          <response>
            <action>user/get_avatar</action>
            <avatar;http://www.mediafire.com/convkey/2938/naaj7pr6l1umcc20g.jpg
            </avatar;
            <result>Success</result>
            <current_api_version>1.1</current_api_version>
          </response>

          Get Info


          Description: Returns a list of the user's personal information.

          Required Parameters:


          Relative Parameters
          • 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')


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

          Response Properties
          • ekey: An alternate form of the session user's ID used for authentication. Only returned if this API was called with SSL.
          • email: The email address of the user
          • first_name: The first name of the user
          • last_name: The last name of the user
          • display_name: The display name of the user
          • gender: The user's gender as specified on their profile
          • birth_date: The user's birth date as specified on their profile
          • location: The user's location as specified on their profile
          • website: The user's website as specified on their profile
          • premium: Whether or not the user is a premium user. 'yes' or 'no'
          • bandwidth: The amount of bandwidh remaining for the user
          • created: The date the account was created
          • max_upload_size: deprecated
          • max_instant_upload_size: deprecated
          • validatedr: Indicates whether or not the user has validated their account. 'yes' or 'no'
          • tos_accepted: Indicates the version of the TOS which was accepted
          • used_storage_size: The amount of storage used
          • base_storage: The amount of storage that the account comes with when no bonus activities have been completed.
          • bonus_storage: The amount of bonus storage the user has earned
          • storage_limit: The amount of base storage + bonus storage
          • storage_limit_exceeded: Signifies whether or not the storage limit has been exceeded. 'yes' or 'no'
          • options: A bit-mask value indicating special details about the session user and the account. The following is a list of bits and their meanings:
            • 5: For future use.
            • 7: For future use.
            • 8: User has disabled flash uploads.
            • 9: User has disabled html5 uploads.
            • 10: User account or seat has been blocked.
            • 11: User has disabled instant uploads.
            • 12: User has disabled persistent storage.
            • 13: User enabled seeing the download page when downloading from themselves.
            • 14: User disabled seeing the download page when downloading from other users.
            • 15: User enabled others to see the download page when downloading their files.
            • 16: Only account owner can download from their account.
            • 17: On duplicate uploaded/copied filename, keep both versions.
            • 18: On duplicate uploaded/copied filename, replace old file.
            • 19: On duplicate uploaded/copied filename, skip operation.
            facebook info:
            • facebook_id: The numerical ID of the user's Facebook account
            • date_created: The date the Facebook account was created
            • email: The email account associated with the user's Facebook account
            • facebook_url: The URL of the user's Facebook account
            • name: The full name of the user associated with their Facebook account
            • firstname: The first name of the user associated with their Facebook account
            • lastname: The last name of the user associated with their Facebook account
            • hometown: The hometown of the user associated with their Facebook account
            • location: The location of the user associated with their Facebook account
            • i18n: The language of the user associated with their Facebook account
            • timezone: The timezone of the user associated with their Facebook account
            • synced: Indicates the last time contacts were synced from this account
            • linked: Indicates whether or not the user has linked their Facebook account. 'yes' or 'no'
            gmail info:
            • linked: Indicates whether or not the user has linked their GMail account. 'yes' or 'no'
            twitter info:
          • linked: Indicates whether or not the user has linked their Twitter account. '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 1:

        Request
        http://www.mediafire.com/api/1.1/user/get_info.php?session_token=123456789012345678901234567890123456789012345678901234567890&version=1
        
        Response
        <response>
          <action>user/get_info</action>
          <user_info>
            <email>john_smith@gmail.com</email>
            <first_name>John</first_name>
            <last_name>Smith</last_name>
            <display_name>John Smith</display_name>
            <gender>Male</gender>
            <birth_date>1977-01-04</birth_date>
            <location/>
            <website/>
            <premium>Yes</premium>
            <bandwidth>14748059221</bandwidth>
            <created>2010-05-05</created>
            <validated>yes</validated>
            <max_upload_size>21474836580</max_upload_size>
            <max_instant_upload_size>2147483748</max_instant_upload_size>
            <tos_accepted>1.1</tos_accepted>
            <used_storage_size>21089108110</used_storage_size>
            <base_storage>268435456000</base_storage>
            <bonus_storage>0</bonus_storage>
            <storage_limit>268435456000</storage_limit>
            <storage_limit_exceeded>no</storage_limit_exceeded>
            <options>25140</options>
            <facebook>
              <facebook_id>575784962</facebook_id>
              <date_created>2012-10-11 12:00:01</date_created>
              <email>john_smith@gmail.com</email>
              <facebook_url>http://www.facebook.com/john_smith</facebook_url>
              <name>John Smith</name>
              <firstname>John</firstname>
              <lastname>Smith</lastname>
              <hometown>Texas, USA</hometown>
              <location/>
              <i18n>en_US</i18n>
              <timezone>-5</timezone>
              <linked>yes</linked>
            </facebook>
            <twitter>
              <twitter_id>162014603</twitter_id>
              <date_created>2012-10-11 12:07:47</date_created>
              <screen_name>johnsmith</screen_name>
              <name>John Smith</name>
              <i18n>en</i18n>
              <linked>yes</linked>
            </twitter>
          </user_info>
          <result>Success</result>
        </response>
        

        Example 2 (Premium user with JSON):

        Request
        https://www.mediafire.com/api/user/get_info.php?response_format=json&session_token=f936121ead0dcc229b571fae97030828d29a326c0149f69e53688b3ffacd11a9f4f6408c7079820776f8000fe7563b44a43d20102fd383603a7e0fc7d83895a969daf6ac4d15a7b0
        
        
        Response
        {
          "response": {
            "action": "user\/get_info",
            "user_info": {
              "ekey": "0c11f4abeb2734ded26edf9ab9671436",
              "email": "clerfjernz@example.com",
              "first_name": "Clerf",
              "last_name": "Jernz",
              "display_name": "Clerf",
              "gender": "Prefer not to answer",
              "birth_date": "0000-00-00",
              "location": "",
              "website": "",
              "premium": "yes",
              "bandwidth": "6316428823938",
              "created": "2012-02-22",
              "max_upload_size": "21474836580",
              "max_instant_upload_size": "4294967295",
              "validated": "yes",
              "tos_accepted": "1.1",
              "used_storage_size": "49649731870",
              "base_storage": "536870912000",
              "bonus_storage": "7516192768",
              "storage_limit": "544387104768",
              "storage_limit_exceeded": "no",
              "options": "49168",
              "facebook": {
                "facebook_id": "6340511089",
                "date_created": "2014-04-30 11:28:06",
                "email": "clerfjernz@example.com",
                "facebook_url": "https:\/\/www.facebook.com\/clerfjernz",
                "name": "Clerf Jernz",
                "firstname": "Clerf",
                "lastname": "Jernz",
                "hometown": "Mergnerlier, Texas",
                "location": "Curnrer, Texas",
                "i18n": "en_US",
                "timezone": "-6",
                "synced": "2014-06-03 15:27:12",
                "linked": "yes"
              },
              "gmail": {
                "gmail_id": "638275305556112238066",
                "created": "2014-07-02 08:10:31",
                "email": "",
                "gmail_url": "",
                "name": "Clerf Jernz",
                "firstname": "Clerf",
                "lastname": "Jernz",
                "i18n": "en",
                "synced": "0000-00-00 00:00:00",
                "linked": "yes"
              },
              "twitter": {
                "twitter_id": "80836181",
                "date_created": "2013-11-20 17:28:49",
                "screen_name": "clerfjernz",
                "name": "Clerf",
                "i18n": "",
                "synced": "2014-01-02 11:44:36",
                "linked": "yes"
              },
              "one_time_key_request_max_count": "100"
            },
            "result": "Success",
            "current_api_version": "1.1"
          }
        }
        

        Example 3 (Basic User with XML):

        Request
        https://www.mediafire.com/api/user/get_info.php?session_token=159a1c20f7b99060f34f10157b41b2188ee35aaf7ca432b31f271d55ad4a38f497c4b7f5f22e4e88c177d6ec7a11f8081cc587653b367eeba685d0fe9b6676828da26b435b1bd9a8
        
        
        
        Response
        <response>
          <action>user/get_info</action>
          <user_info>
            <ekey>a596b53ea937693108f4b4d4e495b0e6</ekey>
            <email>dev@example.com</email>
            <first_name>MediaFire</first_name>
            <last_name>Test</last_name>
            <display_name>MediaFire Test</display_name>
            <gender>Prefer not to answer</gender>
            <birth_date/>
            <location/>
            <website/>
            <premium>no</premium>
            <bandwidth>0</bandwidth>
            <created>2013-04-24</created>
            <max_upload_size>21474836580</max_upload_size>
            <max_instant_upload_size>21474836580</max_instant_upload_size>
            <validated>no</validated>
            <tos_accepted>2.0</tos_accepted>
            <used_storage_size/>
            <base_storage>10739515392</base_storage>
            <bonus_storage>1073741824</bonus_storage>
            <storage_limit>11813257216</storage_limit>
            <storage_limit_exceeded>no</storage_limit_exceeded>
            <options>0</options>
            <facebook>
              <linked>no</linked>
            </facebook>
            <gmail>
              <linked>no</linked>
            </gmail>
            <twitter>
              <linked>no</linked>
            </twitter>
            <one_time_key_request_max_count>100</one_time_key_request_max_count>
          </user_info>
          <result>Success</result>
          <current_api_version>1.1</current_api_version>
        </response>
        

        Example 4 (Basic User with JSON):

        Request
        https://www.mediafire.com/api/user/get_info.php?response_format=json&session_token=159a1c20f7b99060f34f10157b41b2188ee35aaf7ca432b31f271d55ad4a38f497c4b7f5f22e4e88c177d6ec7a11f8081cc587653b367eeba685d0fe9b6676828da26b435b1bd9a8
        
        
        
        
        Response
        {
          "response": {
            "action": "user\/get_info",
            "user_info": {
              "ekey": "a596b53ea937693108f4b4d4e495b0e6",
              "email": "dev@example.com",
              "first_name": "MediaFire",
              "last_name": "Test",
              "display_name": "MediaFire Test",
              "gender": "Prefer not to answer",
              "birth_date": "",
              "location": "",
              "website": "",
              "premium": "no",
              "bandwidth": "0",
              "created": "2013-04-24",
              "max_upload_size": "21474836580",
              "max_instant_upload_size": "21474836580",
              "validated": "no",
              "tos_accepted": "2.0",
              "used_storage_size": "",
              "base_storage": "10739515392",
              "bonus_storage": "1073741824",
              "storage_limit": "11813257216",
              "storage_limit_exceeded": "no",
              "options": "0",
              "facebook": {
                "linked": "no"
              },
              "gmail": {
                "linked": "no"
              },
              "twitter": {
                "linked": "no"
              },
              "one_time_key_request_max_count": "100"
            },
            "result": "Success",
            "current_api_version": "1.1"
          }
        }
        

        Get Limits


        Description: Returns an array of limit-related statuses for the user.

        Required Parameters:


        Relative Parameters
        • 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')


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

        Response Properties
        • storage_base: The standard amount of storage space, in bytes, the session user's account comes with.
        • storage_bonus: The amount of storage space, in bytes, that has been added to the session user's account.
        • storage_limit: The total amount of storage space, in bytes, available to the session user.
        • storage_used: The amount of storage space, in bytes, the session user's files are currently occupying.
        • bandwidth_limit: Premium user's remaining bandwidth (paid not free)
        • bandwidth_used: Total paid bandwidth used
        • collaboration_limit: The amount of collaboration links the session user can generate in a 24 hour period.
        • collaboration_today: The number of collaboration links the session user has generated in the current 24 hour period.
        • one_time_downloads_limit: The amount of one-time download links the session user can generate in a 24 hour period.
        • streaming_bandwidth_limit: The maximum free daily streaming bandwidth (currently 50 GB)
        • streaming_bandwidth_today: The daily streaming bandwidth used so far for today
        • one_time_downloads_today: The amount of one-time download links the session user has generated in the current 24 hour period.
        • upload_size_limit: deprecated

        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_limits.php?session_token=d3d60e59f2cc54457c724677eb73d4588d5f7dafdc7c9e34eb21ab67bf2b707f1d73b91e08347c9fb05193454f2ed5d304d0642d730f8e404e5781e0f1c69f17dda9fd40b9dc814d
        
        Response
        <response>
          <action>user/get_limits</action>
          <storage_base>268435456000</storage_base>
          <storage_bonus>2147483648</storage_bonus>
          <storage_limit>270582939648</storage_limit>
          <storage_used>24366652621</storage_used>
          <bandwidth_limit>1061710081083</bandwidth_limit>
          <bandwidth_used>18263420253</bandwidth_used>
          <collaboration_limit>100</collaboration_limit>
          <collaboration_today>0</collaboration_today>
          <one_time_downloads_limit>500</one_time_downloads_limit>
          <one_time_downloads_today>0</one_time_downloads_today>
          <streaming_bandwidth_limit>53687091200</streaming_bandwidth_limit>
          <streaming_bandwidth_today>0</streaming_bandwidth_today>
          <upload_size_limit>21474836580</upload_size_limit>
          <result>Success</result>
          <current_api_version>1.1</current_api_version>
        </response>

        Get Login Token


        Note: This call requires SSL.

        Description : Generates a 60-second Login Token to be used by the developer to log a user directly into their account.

        Required Parameters:

        • password : The password of the user's MediaFire account.
        • application_id : The ID of the application that is using the API.
        • signature : a SHA1-hashed string that contains the following 4 elements in this sequence : email + password + application_id + API Key.

        Optional Parameters:
        • ekey: An encrypted version of the user's numeric ID to be used in place of email above. Returned by user/get_info when SSL mode is used. Note: pkey can be used to determine when the user's password has changed.
        • response_format : 'xml' or 'json' (default 'xml')


        GET SSL Required https://www.mediafire.com/api/1.1/user/get_login_token.php
        POST SSL Required https://www.mediafire.com/api/1.1/user/get_login_token.php

        Response Properties
        • login_token: A 60 second lifespan token to log a user into their account.
        • pkey: A unique hash token of the session user's password. Compare with previously returned pkeys to determine if the user's password has changed.
        • result: Indicates if the API call was successful. 'Error' or 'Success'.
        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
        https://www.mediafire.com/api/1.1/user/get_login_token.php?email=testemail@domain.com&password=111111&application_id=123456789&signature=0123456789012345678901234567890123456789&version=1
        
        Response
        <response>
          <action>user/get_login_token</action>
          <login_token>
            wp8i0k98850880yeorqmzdhpg42ipptbpsczif9w86ds95wudcdqutafw4qiknxa
          </login_token>
          <ekey>04db5204f94105698405ebf6d06f1655</ekey>
          <pkey>812f898e4c</pkey>
          <result>Success</result>
        </response>

        Get Session Token


        Note: This call requires SSL.

        Description : Generates a session token with a life of 10 minutes to be used in upcoming API requests.

        Required Parameters:

        • application_id : The ID of the application that is using the API.
        • signature : The SHA1 hash string of the following information concatenated in the order shown:
          • (If the application property require_secret_key is not true the api_key may be omitted from signature construction.)
          • Authentication via MediaFire: email or ekey + password + application_id + api_key

        Relative Parameters
        • email : The email address of the user's MediaFire account.
        • password : The password of the user's MediaFire account.
        • ekey : An encrypted version of the user's numeric ID to be used in place of email above. Returned by user/get_info when SSL mode is used.

        Optional Parameters:
        • token_version : 1 or 2 (default 1). The session token version. Version 2 is the token that requires a signature on every API call. Click here for more information about the API Call signature.
        • response_format : 'xml' or 'json' (default 'xml')


        GET SSL Required https://www.mediafire.com/api/1.1/user/get_session_token.php
        POST SSL Required https://www.mediafire.com/api/1.1/user/get_session_token.php

        Response Properties
        • session_token: A token to authenticate the session user in subsequent API calls.
          • v1: Ten minute lifespan but can be renewed with user/renew_session_token before it expires.
          • v2: Two year lifespan but requires the accompaniment of a signature.
        • secret_key: A component used in the construction of Session Token v2 signatures.
        • time: A component used in the construction of Session Token v2 signatures.
        • ekey: An alternate form of the session user's ID to be used in place of email in certain APIs.
        • pkey: A unique hash token of the session user's password. Compare with previously returned pkeys to determine if the user's password has changed.
        • result: Signifies if the API call was successful: 'Error or Success'
        Error Response when the App did not Pass the App Authentication Setting (domain, network, callback, or omit_api_key):
        • message: 'Unable to authenticate app'
        • error: '248'
        Error Response when the Supplied Account is Locked:
        • message: 'This account is temporarily locked. Please, try again'
        • error: '243'

        Example 1:

        Request
        https://www.mediafire.com/api/1.1/user/get_session_token.php?email=testemail@domain.com&password=111111&application_id=9999&signature=d9ce3bfaba1e0bef7a5d99bdab706e36b4ee8c71
        Response
        <response>
          <action>user/get_session_token</action>
          <session_token>
                123456789012345678901234567890123456789012345678901234567890
          </session_token>
          <ekey>04db5204f94105698405ebf6d06f1655</ekey>
          <pkey>812f898e4c</pkey>
          <result>Success</result>
        </response>
        


        Note: pkey can be used to determine when the user's password has changed.

        Example 2 (Version 2):

        Request
        https://www.mediafire.com/api/1.1/user/get_session_token.php?email=testemail@domain.com&password=111111&application_id=9999&signature=d9ce3bfaba1e0bef7a5d99bdab706e36b4ee8c71&token_version=2
        
        Response
        <response>
          <action>user/get_session_token</action>
          <session_token>3c8976bef4c1d1564ef7f1eef55863ce10413b95d5df02ccc5de522688bacda3412b35cf432db49619148d92395fd1ff9c7c0ec437042409f955f9af393ca531196a60b4baa95a8d</session_token>
          <secret_key>522659691</secret_key>
          <time>1402603036.8692</time>
          <ekey>04db5204f94105698405ebf6d06f1655</ekey>
          <pkey>812f898e4c</pkey>
          <result>Success</result>
          <current_api_version>1.1</current_api_version>
        </response>

        Example 3 (JSON):

        Request
        https://www.mediafire.com/api/1.1/user/get_session_token.php?email=testemail@domain.com&password=111111&application_id=9999&signature=d9ce3bfaba1e0bef7a5d99bdab706e36b4ee8c71&response_format=json
        Response
        {
            "response":{
                "action":"user/get_session_token",
                "session_token":"123456789012345678901234567890123456789012345678901234567890",
                "ekey":"04db5204f94105698405ebf6d06f1655",
                "pkey":"812f898e4c",
                "result":"Success",
                "current_api_version":"1.1"
            }
        }

        Example 4 (invalid signature=error):

        Request
        https://www.mediafire.com/api/1.1/user/get_session_token.php?email=testemail@domain.com&password=111111&application_id=9999&signature=[INVALID-SIGNATURE]
        Response
        <response>
          <action>user/get_session_token</action>
          <message>The signature you specified is invalid</message>
          <error>127</error>
          <result>Error</result>
          <current_api_version>1.1</current_api_version>
        </response>

        Get Settings


        Description: Returns a list of the user's account settings.

        Required Parameters:


        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')


        GET http://www.mediafire.com/api/1.1/user/get_settings.php
        POST http://www.mediafire.com/api/1.1/user/get_settings.php

        Response Properties
        • max_upload_size: deprecated
        • max_instant_upload_size: deprecated
        • validated: Indicates whether or not the user has validated their email address. no or yes.
        • instant_uploads_enabled: Indicates the availability of performing "instant" uploads. no or yes.
        • show_download_page: Show the download page in certain scenarios.
          • me_from_me: Show the download page when I am logged in and downloading from myself. no or yes.
          • me_from_others: Show the download page when I am logged in and downloading from someone else. no or yes.
          • others_from_me: Show the download page when someone else, logged in or our, downloads from me. no or yes.
        • auto_bandwidth: Automatically purchase more bandwidth when my available bandwidth get low. no or yes.
        • used_storage_size: The amount of storage space, in bytes, the session user's files are currently occupying.
        • storage_limit: The total amount of storage space, in bytes, available to the session user.
        • storage_limit_exceeded: Indicates if the session user's files are occupying more space than is available to the user. no or yes.
        • previous_file_versions: The number of older file versions to keep for a file.
        • default_share_link_status: Specifies the initial share link status for a new file. enabled, disabled, inherit.
        • result: Indicates if the API call was successful. 'Error' or 'Success'.
        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_settings.php?session_token=123456789012345678901234567890123456789012345678901234567890
        
        Response
        <response>
          <action>user/get_settings</action>
          <settings>
            <max_upload_size>4294967396</max_upload_size>
            <max_instant_upload_size>2147483748</max_instant_upload_size>
            <validated>yes</validated>
            <instant_uploads_enabled>no</instant_uploads_enabled>
            <show_download_page>
              <me_from_me>no</me_from_me>
              <me_from_others>yes</me_from_others>
              <others_from_me>no</others_from_me>
            </show_download_page>
            <auto_bandwidth>
              <enabled>no</enabled>
            </auto_bandwidth>
            <used_storage_size>24205916045</used_storage_size>
            <storage_limit>272730423296</storage_limit>
            <storage_limit_exceeded>no</storage_limit_exceeded>
            <previous_file_versions>5</previous_file_versions>
            <default_share_link_status>inherit</default_share_link_status>
          </settings>
          <result>Success</result>
          <current_api_version>1.1</current_api_version>
        </response>
        


        Description: Links a Facebook account with a MediaFire account.

        Required Parameters:

        • session_token : A type 1 or type 2 session token. (Type 2 will require a call signature).
        • fb_access_token: The access token to authenticate the Facebook account (this must be obtained from Facebook's API).

        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')

        Error Codes: 105, 128, 129, 184


        GET http://www.mediafire.com/api/1.1/user/link_facebook.php
        POST http://www.mediafire.com/api/1.1/user/link_facebook.php

        Example:

        Request
        http://dev.mediafire.com/api/1.1/user/link_facebook.php?session_token=bf12c5a38d45cb89a6ef4bd8d02dc65d90a401127ccf1b67730f8ef349ac781a142855640c689ef8d5b5cf7ffc4d68230ca2f2fa87e30f8332cf58b3e3e2783074767a838310b29b&fb_access_token=CAABxTchXR1cBAEMgY50ZCRyNDsjEZBWSgedkxmbUaDcMAyld2WvnFWmcTLTwRVS4UX5IZARZCHB6XbziQMympWthviNbCw0a0x5wsL2QIjovkF4F1yTD3ZAOVAi8rggq0YKI4x2aEycf53GMpZB8T8qpNxqBnZBL4JnIkv5nCIdsoZAZCtm1xfH56yi7g0Wze2eVWd57zD16rTgZDZD
        
        Response
        <response>
          <action>user/link_facebook</action>
          <result>Success</result>
          <current_api_version>1.1</current_api_version>
        </response>


        Description: Links a Twitter account with a MediaFire account.

        Required Parameters:

        • session_token : A type 1 or type 2 session token. (Type 2 will require a call signature).
        • tw_oauth_token: The Twitter OAuth token which corresponds with the user's MediaFire account (this must be obtained from Twitter's API).
        • tw_oauth_token_secret : The OAuth Token Secret to authenticate the Twitter account (this must be obtained from Twitter's API).

        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')

        Error Codes: 105, 128, 129, 184


        GET http://www.mediafire.com/api/1.1/user/link_twitter.php
        POST http://www.mediafire.com/api/1.1/user/link_twitter.php

        Example:

        Request
        http://www.mediafire.com/api/1.1/user/link_twitter.php?session_token=bf12c5a38d45cb89a6ef4bd8d02dc65d90a401127ccf1b67730f8ef349ac781a142855640c689ef8d5b5cf7ffc4d68230ca2f2fa87e30f8332cf58b3e3e2783074767a838310b29b&
        
        Response
        <response>
          <action>user/link_twitter</action>
          <result>Success</result>
          <current_api_version>1.1</current_api_version>
        </response>

        Register


        Note: This API requires SSL and is restricted. If you wish to enable this feature in your app, please contact customer service.

        Description : Registers a MediaFire account.

        Required Parameters:

        • application_id : The application that is using the API.

        Relative Parameters: One of the following account identifiers:
        • email : The email address to be used as a login to the user's MediaFire account, and
        • password : The password of the user's MediaFire account.

        Optional Parameters:
        • first_name: The first name of the user.
        • last_name : The last name of the user.
        • display_name : The name to be displayed on the user's shared items.
        • response_format : 'xml' or 'json' (default 'xml')


        GET SSL Required https://www.mediafire.com/api/1.1/user/register.php
        POST SSL Required https://www.mediafire.com/api/1.1/user/register.php

        Response Properties
        • pkey: A unique hash token of the session user's password. Compare with previously returned pkeys to determine if the user's password has changed.
        • result: Signifies if the API call was successful: 'Error or Success'
        Error Response when the User is Already Registered:
        • message: 'Access Denied'
        • error: '114'


        Example:

        Request
        https://www.mediafire.com/api/1.1/user/register.php?application_id=1000&email=test_email@domain.com&password=123456789&version=1
        
        Response
        <response>
          <action>user/register</action>
          <email>test_email@domain.com</email>
          <created>2011-05-15 14:35:01</created>
          <pkey>812f898e4c</pkey>
          <result>Success</result>
        </response>
        

        Note: pkey can be used to determine when the user's password has changed.

        Renew Session Token


        Description : Extends the life of the session token by another 10 minutes. If the session token is less than 5 minutes old, then it does not get renewed and the same token is returned. If the token is more than 5 minutes old, then, depending on the application configuration, the token gets extended or a new token is generated and returned.

        Required Parameters:


        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')


        GET https://www.mediafire.com/api/1.1/user/renew_session_token.php
        POST https://www.mediafire.com/api/1.1/user/renew_session_token.php

        Response Properties
        • session_token: The user's current session token
        • result: Indicates if the API call was successful. 'Error' or 'Success'.
        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/renew_session_token.php?session_token=7d31c37ae57f08951f7e50e69eaf81d2a1a8c047aabc945272e838f82e3384f4ebfe89453f888b9c3a7a777667ada551c21604493d9863e61db0593ad06a45cf2d46f016771732a4
        
        Response
        <response>
          <action>user/renew_session_token</action>
          <session_token>7d31c37ae57f08951f7e50e69eaf81d2a1a8c047aabc945272e838f82e3384f4ebfe89453f888b9c3a7a777667ada551c21604493d9863e61db0593ad06a45cf2d46f016771732a4</session_token>
          <result>Success</result>
          <current_api_version>1.1</current_api_version>
        </response>
        

        Set Avatar


        Description : Save a copy of an image file, or a remote image, to serve as the operating user's avatar.

        Notes: 'action', 'quickkey' or 'url' must be passed and the API evaluates them in this order. It is important to note that if all three parameters are passed 'action' will be acted upon while 'quickkey' and 'url' are ignored. If 'quickkey' and 'url' are passed only 'quickkey' will be acted upon, 'url' will be ignored.

        Required Parameters:


        Relative Parameters:
        • action : The type of change to make to the avatar: 'set_default' (unset but retain custom avatar) or 'remove' (unset and remove custom avatar).
        OR
        • quick_key : The quickkey of the image file to be used as an avatar.
        OR
        • url : The URL where this image file is located.

        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
        • quick_key: The quickkey of the avatar.
        • device_revision: The revision of the cloud device.
        • result: Signifies if the API call was successful. Error or Success.
        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'

        GET https://www.mediafire.com/api/1.1/user/set_avatar.php
        POST https://www.mediafire.com/api/1.1/user/set_avatar.php

        Example:

        Request
        http://www.mediafire.com/api/1.1/user/set_avatar.php?quick_key=naaj7pr6l1umcc2&session_token=e6829fe5892012154097c19ed0635741a6269cbe5dec2a5ae600b2d70e64b45afd03e00cd15ca0d8d17c2348933894db1ef00dda21bd098d6ba1f51f5e82f7a1a28b454f1bd399ae
        
        Response
        <response>
          <action>user/set_avatar</action>
          <quick_key>2tjwz6tw6d8i698</quick_key>
          <result>Success</result>
          <current_api_version>1.1</current_api_version>
        </response>
        

        Set Settings


        Description : Set user preferences.

        Required Parameters:


        Optional Parameters:
        • signature : This is the call signature that is required to authenticate a type 2 session token transaction.
        • previous_file_versions : The number of old file versions to keep.
        • response_format : 'xml' or 'json' (default 'xml')


        Response Properties
        • result: Signifies if the API call was successful. Error or Success.
        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'

        GET SSL Required https://www.mediafire.com/api/1.1/user/set_settings.php
        POST SSL Required https://www.mediafire.com/api/1.1/user/set_settings.php

        Example:

        Request
        http://www.mediafire.com/api/1.1/user/set_settings.php?session_token=7d31c37ae57f08951f7e50e69eaf81d2a1a8c047aabc945272e838f82e3384f4ebfe89453f888b9c3a7a777667ada551c21604493d9863e61db0593ad06a45cf2d46f016771732a4&previous_file_versions=8
        
        Response
        <response>
          <action>user/set_settings</action>
          <result>Success</result>
          <current_api_version>1.1</current_api_version>
        </response>
        


        Description : Unlinks the associated Facebook account from the session user's MediaFire account.

        Required Parameters:


        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')


        GET https://www.mediafire.com/api/1.1/user/unlink_facebook.php
        POST https://www.mediafire.com/api/1.1/user/unlink_facebook.php

        Response Properties
        • result: Indicates if the API call was successful. 'Error' or 'Success'
        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/unlink_facebook.php?session_token=bf12c5a38d45cb89a6ef4bd8d02dc65d90a401127ccf1b67730f8ef349ac781a142855640c689ef8d5b5cf7ffc4d68230ca2f2fa87e30f8332cf58b3e3e2783074767a838310b29b
        
        Response
        <response>
          <action>user/unlink_facebook</action>
          <result>Success</result>
          <current_api_version>1.1</current_api_version>
        </response>


        Description : Unlinks the associated Twitter account from the session user's MediaFire account.

        Required Parameters:


        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')


        GET https://www.mediafire.com/api/1.1/user/unlink_twitter.php
        POST https://www.mediafire.com/api/1.1/user/unlink_twitter.php

        Example:

        Request
        http://www.mediafire.com/api/1.1/user/unlink_twitter.php?session_token=bf12c5a38d45cb89a6ef4bd8d02dc65d90a401127ccf1b67730f8ef349ac781a142855640c689ef8d5b5cf7ffc4d68230ca2f2fa87e30f8332cf58b3e3e2783074767a838310b29b
            
        Response
        <response>
          <action>user/unlink_twitter</action>
          <result>Success</result>
          <current_api_version>1.1</current_api_version>
        </response>

        Update


        Description : Updates the user's personal information.

        Required Parameters:

        • session_token : A type 1 or type 2 session token. (Type 2 will require a call signature).
        • The user's current password will need to be passed to update either the user's email address or their password.
        • Both the subdomain and company_name must be passed to update either.

        Optional Parameters:
        • display_name : The user's display name.
        • first_name : The user's first name.
        • last_name : The user's last name.
        • email : The new email. To update the email, current_password has to be passed.
        • password : The new password. To update the password, current_password has to be passed.
        • current_password : For security, the current password of the account has to be passed when updating the email or the password.
        • birth_date : The user's birth date. It should take the format "yyyy-mm-dd".
        • gender : The user's gender ('male', 'female', or 'none').
        • website : The user's website URL.
        • subdomain : The user's subdomain.
        • location : The user's address location.
        • newsletter : Whether to receive MediaFire site news via email ('yes' or 'no').
        • primary_usage : The user's primary usage of this MediaFire account ('home', 'work', 'school', or 'none').
        • timezone : The code of the local timezone of the user.
        • signature : This is the call signature that is required to authenticate a type 2 session token transaction.
        • response_format : 'xml' or 'json' (default 'xml')


        GET https://www.mediafire.com/api/1.1/user/update.php
        POST https://www.mediafire.com/api/1.1/user/update.php

        Response Properties
        • pkey: A unique hash token of the session user's password. Compare with previously returned pkeys to determine if the user's password has changed.
        • result: Indicates if the API call was successful. 'Error' or 'Success'.
        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/update.php?session_token=123456789012345678901234567890123456789012345678901234567890&display_name=test_display_name&first_name=test_first_name&birth_date=1999-01-01&version=1
        
        Response
        <response>
          <action>user/update</action>
          <pkey>812f898e4c</pkey>
          <result>Success</result>
          <current_api_version>1.1</current_api_version>
        </response>
        
        Note: pkey can be used to determine when the user's password has changed.