User1.2

Accept Terms of Service


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

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


Response Properties

Name Description Type
result Indicates if the API call was successful: 'Success' or 'Error'

Error Codes

To view a list of possible error codes for this API, and their descriptions, click here.


Examples:

Request
http://www.mediafire.com/api/1.2/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


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

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


Response Properties

Name Description Type
result Indicates if the API call was successful: 'Success' or 'Error' string

Error Codes

To view a list of possible error codes for this API, and their descriptions, click here.


Examples:


Example 1 (Success with XML):

Request
http://www.mediafire.com/api/1.2/user/accept_tos.php?session_token=ab951de178b31957f16a769ea69b58b5bf33f6b1bc03077c99d79d8605ed9a1e45b7edf2a9952fe18fd512bce0fa2d4f1fc1ee92215f33700be424d184e3637ca15a90108a2813fe&acceptance_token=331a1777f6af415b5f46f6fc0772e9fc
Response
<response>
  <action>user/accept_tos</action>
  <result>Success</result>
</response>

Example 2 (Success with JSON):

Request
http://www.mediafire.com/api/user/accept_tos.php?acceptance_token=331a1777f6af415b5f46f6fc0772e9fc&session_token=ab951de178b31957f16a769ea69b58b5bf33f6b1bc03077c99d79d8605ed9a1e45b7edf2a9952fe18fd512bce0fa2d4f1fc1ee92215f33700be424d184e3637ca15a90108a2813fe&response_format=json
Response
{
  "response": {
    "action": "user/accept_tos",
    "result": "Success",
    "current_api_version": "1.2"
  }
}

Destroy Action Token


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

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


Response Properties

Name Description Type
result Indicates if the API call was successful: 'Success' or 'Error' string

Error Codes

To view a list of possible error codes for this API, and their descriptions, click here.


Examples:


Example 1 (Success with XML):

Request
https://www.mediafire.com/api/1.2/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.2</current_api_version>
</response>

Example 2 (Success with JSON):

Request
http://www.mediafire.com/api/user/accept_tos.php?acceptance_token=331a1777f6af415b5f46f6fc0772e9fc&session_token=ab951de178b31957f16a769ea69b58b5bf33f6b1bc03077c99d79d8605ed9a1e45b7edf2a9952fe18fd512bce0fa2d4f1fc1ee92215f33700be424d184e3637ca15a90108a2813fe&response_format=json
Response
{
  "response": {
    "action": "user/accept_tos",
    "result": "Success",
    "current_api_version": "1.2"
  }
}

Fetch Terms Of Service


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

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


      Response Properties

      Name Description Type
      revision The revision 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 Indicates whether or not the user previously accepted the terms of service: 'yes' or 'no'
      acceptance_token The acceptance token which is needed for user/accept_tos
      result Indicates if the API call was successful: 'Success' or 'Error'

      Error Codes

      To view a list of possible error codes for this API, and their descriptions, click here.


      Examples:

      Request
      http://www.mediafire.com/api/1.2/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.2</current_api_version>
      </response>

      Fetch Terms Of Service


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

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


      Response Properties

      Name Description Type
      revision The revision number of the Terms of Service string
      terms_of_service Details aout the Terms of Service object
      terms_of_service The complete text of the Terms of Service (under 'terms_of_service') string
      date The date and time the current TOS text was created (under 'terms_of_service') string timestamp
      user_accepted_terms Indicates whether or not the user previously accepted the terms of service: 'yes' or 'no' (under 'terms_of_service') yes/no flag
      acceptance_token The acceptance token which is needed for user/accept_tos (under 'terms_of_service') string
      result Indicates if the API call was successful: 'Success' or 'Error' string

      Error Codes

      To view a list of possible error codes for this API, and their descriptions, click here.


      Examples:


      Example 1 (Success with XML):

      Request
      http://www.mediafire.com/api/1.2/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.2</current_api_version>
      </response>

      Example 2 (Success with JSON):

      Request
      http://www.mediafire.com/api/user/fetch_tos.php?session_token=ab951de178b31957f16a769ea69b58b5bf33f6b1bc03077c99d79d8605ed9a1e45b7edf2a9952fe18fd512bce0fa2d4f1fc1ee92215f33700be424d184e3637ca15a90108a2813fe&response_format=json
      
      Response
      {
        "response": {
          "action": "user/fetch_tos",
          "terms_of_service": {
            "revision": "0.11",
            "terms": "Term of Service Example Text",
            "date": "2013-01-25 12:22:28",
            "user_accepted_terms": "yes",
            "acceptance_token": "331a1777f6af415b5f46f6fc0772e9fc"
          },
          "result": "Success",
          "current_api_version": "1.2"
        }
      }

      Get Action Token


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

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


      Response Properties

      Name Description Type
      action_token The action token needed for user/destory_action_token string
      result Indicates if the API call was successful: 'Success' or 'Error' string

      Error Codes

      To view a list of possible error codes for this API, and their descriptions, click here.


      Examples:


      Example 1 (Success with XML):

      Request
      http://www.mediafire.com/api/1.2/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.2</current_api_version> </response>

      Example 2 (Success with JSON):

      Request
      http://www.mediafire.com/api/user/get_action_token.php?type=image&lifespan=600&session_token=e6829fe5892012154097c19ed0635741a6269cbe5dec2a5ae600b2d70e64b45afd03e00cd15ca0d8d17c2348933894db1ef00dda21bd098d6ba1f51f5e82f7a1a28b454f1bd399ae&response_format=json
      
      Response
      {
        "response": {
          "action": "user/get_action_token",
          "action_token": "3bbdb91e5d8e171c6943736da69843b882130b2f0cf19189f7b927c712c06c834ab0d2bd0c7424a6c7fdedd6dea970f1132820cbfcaa8cd078dddfe662cda71f4a4dc4d4d89ea13e",
          "result": "Success",
          "current_api_version": "1.2"
        }
      }

      Example 3 (calling the conversion server):

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

      Get Avatar


      GET http://www.mediafire.com/api/1.2/user/get_avatar.php
      POST http://www.mediafire.com/api/1.2/user/get_avatar.php

      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

      Name Description Type
      avatar The avatar URL for the user string
      result Indicates if the API call was successful: 'Success' or 'Error' string

      Error Codes

      To view a list of possible error codes for this API, and their descriptions, click here.


      Examples:


      Example 1 (Success with XML):

      Request
      http://www.mediafire.com/api/1.2/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.2</current_api_version>
      </response>

      Example 2 (Success with JSON):

      Request
      http://www.mediafire.com/api/user/get_avatar.php?session_token=e6829fe5892012154097c19ed0635741a6269cbe5dec2a5ae600b2d70e64b45afd03e00cd15ca0d8d17c2348933894db1ef00dda21bd098d6ba1f51f5e82f7a1a28b454f1bd399ae&response_format=json
      
      Response
      {
        "response": {
          "action": "user/get_avatar",
          "avatar": "http://www.mediafire.com/convkey/2938/naaj7pr6l1umcc20g.jpg",
          "result": "Success",
          "current_api_version": "1.2"
        }
      }

      Get Info


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

      Notes: The response properties max_upload_size & max_instant_upload_size have been deprecated.

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


      Response Properties

      Name Description Type
      ekey An alternate form of the session user's ID used for authentication. Only returned if this API was called with SSL. string
      email The email address of the user string
      first_name The first name of the user string
      last_name The last name of the user string
      display_name The display name of the user string
      gender The user's gender as specified on their profile string
      birth_date The user's birth date as specified on their profile string datestamp
      location The user's location as specified on their profile string
      website The user's website as specified on their profile string
      premium Whether or not the user is a premium user. 'yes' or 'no' yes/no flag
      bandwidth The amount of bandwidth remaining for the user integer
      created The date the account was created string datestamp
      max_upload_size [DEPRECATED] integer
      max_instant_upload_size [DEPRECATED] integer
      validated Indicates whether or not the user has validated their account. 'yes' or 'no' yes/no flag
      tos_accepted Indicates the version of the TOS which was accepted string
      used_storage_size The amount of storage used in bytes integer
      base_storage The amount of storage that the account comes with when no bonus activities have been completed. integer
      bonus_storage The amount of bonus storage the user has earned integer
      storage_limit The amount of base storage + bonus storage integer
      storage_limit_exceeded Indicates if the storage limit has been exceeded. 'yes' or 'no' yes/no flag
      options **see note below** bitmask

      Note about the property 'options': A bitmask 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 Response Properties:
      Name Description Type
      facebook_id The numerical ID of the user's Facebook account integer
      date_created The date the Facebook account was created string timestamp
      email The email account associated with the user's Facebook account string
      facebook_url The URL of the user's Facebook account string
      name The full name of the user associated with their Facebook account string
      firstname The first name of the user associated with their Facebook account string
      lastname The last name of the user associated with their Facebook account string
      hometown The hometown of the user associated with their Facebook account string
      location The location of the user associated with their Facebook account string
      i18n The language of the user associated with their Facebook account string
      timezone The timezone of the user associated with their Facebook account integer
      synced Indicates the last time contacts were synced from this account string timestamp
      linked Indicates whether or not the user has linked their Facebook account. 'yes' or 'no' yes/no flag

      GMail Response Properties:
      Name Description Type
      linked Indicates whether or not the user has linked their Gmail account. 'yes' or 'no' yes/no flag

      Twitter Response Properties:
      Name Description Type
      linked Indicates whether or not the user has linked their Twitter account. 'yes' or 'no' yes/no flag

      Error Codes

      To view a list of possible error codes for this API, and their descriptions, click here.


      Examples:


      Example 1 (Premium user with XML):

      Request
      http://www.mediafire.com/api/1.2/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>
          <tos_accepted>1.2</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",
            "validated": "yes",
            "tos_accepted": "1.2",
            "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.2"
        }
      }
      

      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>
          <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.2</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",
            "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.2"
        }
      }
      

      Get Limits


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

      Notes: Deprecated response property upload_size_limit.

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


      Response Properties

      Name Description Type
      storage_base The standard amount of storage space, in bytes, the session user's account comes with. integer
      storage_bonus The amount of storage space, in bytes, that has been added to the session user's account. integer
      storage_limit The total amount of storage space, in bytes, available to the session user. integer
      storage_used The amount of storage space, in bytes, the session user's files are currently occupying. integer
      bandwidth_limit Premium user's remaining bandwidth (paid not free) integer
      bandwidth_used Total paid bandwidth used integer
      collaboration_limit The amount of collaboration links the session user can generate in a 24-hour period. integer
      collaboration_today The number of collaboration links the session user has generated in the current 24-hour period. integer
      one_time_downloads_limit The amount of one-time download links the session user can generate in a 24-hour period. integer
      streaming_bandwidth_limit The maximum free daily streaming bandwidth (currently 50 GB) integer
      streaming_bandwidth_today The daily streaming bandwidth used so far for today integer
      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] integer
      current_api_version The current api version string
      result Indicates if the API call was successful: 'Success' or 'Error' string

      Error Codes

      To view a list of possible error codes for this API, and their descriptions, click here.


      Examples:


      Example 1 (Success with XML):

      Request
      http://www.mediafire.com/api/1.2/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>
        <result>Success</result>
        <current_api_version>1.2</current_api_version>
      </response>

      Example 2 (Success with JSON):

      Request
      http://www.mediafire.com/api/user/1.2/get_limits.php?session_token=d3d60e59f2cc54457c724677eb73d4588d5f7dafdc7c9e34eb21ab67bf2b707f1d73b91e08347c9fb05193454f2ed5d304d0642d730f8e404e5781e0f1c69f17dda9fd40b9dc814d&response_format=json
      
      Response
      {
        "response": {
          "action": "user/get_limits",
          "storage_base": "268435456000",
          "storage_bonus": "2147483648",
          "storage_limit": "270582939648",
          "storage_used": "24366652621",
          "bandwidth_limit": "1061710081083",
          "bandwidth_used": "18263420253",
          "collaboration_limit": "100",
          "collaboration_today": "0",
          "one_time_downloads_limit": "500",
          "one_time_downloads_today": "0",
          "streaming_bandwidth_limit": "53687091200",
          "streaming_bandwidth_today": "0",
          "upload_size_limit": "21474836580",
          "result": "Success",
          "current_api_version": "1.2"
        }
      }
      

      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.2/user/get_login_token.php
      POST SSL Required https://www.mediafire.com/api/1.2/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.2/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


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

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


      Response Properties

      Name Description Type
      session_token A token to authenticate the session user in subsequent API calls ('v1' has ten minute lifespan but can be renewed with user/renew_session_token before it expires AND 'v2' has two year lifespan but requires the accompaniment of a signature. string
      secret_key A component used in the construction of Session Token v2 signatures. integer
      time A component used in the construction of Session Token v2 signatures. decimal number
      ekey An alternate form of the session user's ID to be used in place of email in certain APIs. string
      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. string
      result Indicates if the API call was successful: 'Success' or 'Error' string

      Error Codes

      To view a list of possible error codes for this API, and their descriptions, click here.


      Examples:


      Example 1 (token_version=1 with XMl):

      Request
      https://www.mediafire.com/api/1.2/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>
      

      Example 2 (token_version=2 with XML):

      Request
      https://www.mediafire.com/api/1.2/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.2</current_api_version>
      </response>

      Example 3 (token_version=1 with JSON):

      Request
      https://www.mediafire.com/api/1.2/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":"3f643fbbda95b7dfc4a094927a8bb23cde7bc64481f015eabca2559ae1835984c85566f97882e4c598e5702f556064e22bb9e8f6b9d12a67a7bd74e4bdd553c958e489572cd0d1fc",
          "ekey":"04db5204f94105698405ebf6d06f1655",
          "pkey":"812f898e4c",
          "result":"Success",
          "current_api_version":"1.2"
        }
      }

      Example 4 (token_version=2 with JSON):

      Request
      https://www.mediafire.com/api/1.2/user/get_session_token.php?email=testemail@domain.com&password=111111&application_id=9999&signature=d9ce3bfaba1e0bef7a5d99bdab706e36b4ee8c71&token_version=2&response_format=json
      
      Response
      {
        "response":{
          "action":"user\/get_session_token",
          "session_token":"3f643fbbda95b7dfc4a094927a8bb23cde7bc64481f015eabca2559ae1835984c85566f97882e4c598e5702f556064e22bb9e8f6b9d12a67a7bd74e4bdd553c958e489572cd0d1fc",
          "secret_key":"9316931",
          "time":"1359061000.8125",
          "ekey":"04db5204f94105698405ebf6d06f1655",
          "pkey":"812f898e4c",
          "result":"Success",
          "current_api_version":"1.2"
        }
      }

      Example 5 (Failure - invalid signature=error with XML):

      Request
      https://www.mediafire.com/api/1.2/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.2</current_api_version>
      </response>

      Example 6 (Failure - invalid signature=error with JSON):

      Request
      https://www.mediafire.com/api/1.2/user/get_session_token.php?email=testemail@domain.com&password=111111&application_id=9999&signature=INVALID-SIGNATURE&response_format=json
      
      Response
      {
        "response":{
          "action":"user\/get_session_token",
          "message":"The signature you specified is invalid",
          "error":127,
          "result":"Error",
          "current_api_version":"1.2"
        }
      }

      Get Settings


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

      Notes: The response properties max_upload_size and max_instant_upload_size are deprecated.

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

      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

      Name Description Type
      max_upload_size [DEPRECATED] integer
      max_instant_upload_size [DEPRECATED] integer
      validated Indicates whether or not the user has validated their email address. 'yes' or 'no'. yes/no flag
      instant_uploads_enabled Indicates the availability of performing "instant" uploads. 'yes' or 'no'. yes/no flag
      me_from_me Show the download page when I am logged in and downloading from myself: 'yes' or 'no' (this appears under the subheading 'show_download_page') yes/no flag
      me_from_others Show the download page when I am logged in and downloading from someone else: 'yes' or 'no' (this appears under the subheading 'show_download_page') yes/no flag
      others_from_me Show the download page when someone else, logged in or our, downloads from me: 'yes' or 'no' (this appears under the subheading 'show_download_page') yes/no flag
      auto_bandwidth Automatically purchase more bandwidth when my available bandwidth get low. 'yes' or 'no' yes/no flag
      used_storage_size The amount of storage space, in bytes, the session user's files are currently occupying. integer
      storage_limit The total amount of storage space, in bytes, available to the session user. integer
      storage_limit_exceeded Indicates if the session user's files are occupying more space than is available to the user. 'yes' or 'no'. yes/no flag
      previous_file_versions The number of older file versions to keep for a file. integer
      default_share_link_status Specifies the initial share link status for a new file. 'enabled', 'disabled', or 'inherit'. string
      result Indicates if the API call was successful. 'Success' or 'Error' string

      Error Codes

      To view a list of possible error codes for this API, and their descriptions, click here.


      Examples:


      Example 1 (Success with XML):

      Request
      http://www.mediafire.com/api/1.2/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>
          <collect_metadata>yes</collect_metadata>
        </settings>
        <result>Success</result>
        <current_api_version>1.2</current_api_version>
      </response>
      

      Example 2 (Success with JSON):

      Request
      http://www.mediafire.com/api/1.2/user/get_settings.php?session_token=3f643fbbda95b7dfc4a094927a8bb23cde7bc64481f015eabca2559ae1835984c85566f97882e4c598e5702f556064e22bb9e8f6b9d12a67a7bd74e4bdd553c958e489572cd0d1fc&response_format=json
      
      
      Response
      {
        "response": {
          "action": "user/get_settings",
          "settings": {
            "max_upload_size": "4294967396",
            "max_instant_upload_size": "2147483748",
            "validated": "yes",
            "instant_uploads_enabled": "no",
            "show_download_page": {
              "me_from_me": "no",
              "me_from_others": "yes",
              "others_from_me": "no"
            },
            "auto_bandwidth": {
              "enabled": "no"
            },
            "used_storage_size": "24205916045",
            "storage_limit": "272730423296",
            "storage_limit_exceeded": "no",
            "previous_file_versions": "5",
            "default_share_link_status": "inherit",
            "collect_metadata": "yes"
          },
          "result": "Success",
          "current_api_version": "1.2"
        }
      }
      


      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.2/user/link_facebook.php
      POST http://www.mediafire.com/api/1.2/user/link_facebook.php

      Example:

      Request
      http://dev.mediafire.com/api/1.2/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.2</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.2/user/link_twitter.php
      POST http://www.mediafire.com/api/1.2/user/link_twitter.php

      Example:

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

      Register


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

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

    Response Properties

    Name Description Type
    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. string
    ekey An alternate form of the session user's ID to be used in place of email in certain APIs. string
    result Indicates if the API call was successful: 'Error or Success' string

    Error Codes

    To view a list of possible error codes for this API, and their descriptions, click here.


    Examples:


    Example 1 (Success with XML):

    Request
    https://www.mediafire.com/api/1.2/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>
    <<<ekey>2e50262dcbb116dd1549c3666a4d1dd5</ekey>
    <<<result>Success</result>
    </response>
    

    Example 1 (Success with JSON):

    Request
    https://www.mediafire.com/api/1.2/user/register.php?application_id=1000&email=test_email@domain.com&password=123456789&response_format=json
    
    
    Response
    <response>{
      "response": {
        "action": "user/register",
        "email": "test_email@domain.com",
        "created": "2011-05-15 14:35:01",
        "pkey": "812f898e4c",
    	"ekey": "2e50262dcbb116dd1549c3666a4d1dd5",
        "result": "Success",
        "current_api_version": "1.2"
      }
    }
    

    Renew Session Token


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

    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:


    Relative Parameters:

    • none

    Optional Parameters:

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


    Response Properties

    Name Description Type
    session_token The user's current session token string
    result Indicates if the API call was successful. 'Success' or 'Error' string

    Error Codes

    To view a list of possible error codes for this API, and their descriptions, click here.


    Examples:


    Example 1 (Success with XML):

    Request
    http://www.mediafire.com/api/1.2/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.2</current_api_version>
    </response>
    

    Example 2 (Success with JSON):

    Request
    http://www.mediafire.com/api/user/renew_session_token.php?session_token=7d31c37ae57f08951f7e50e69eaf81d2a1a8c047aabc945272e838f82e3384f4ebfe89453f888b9c3a7a777667ada551c21604493d9863e61db0593ad06a45cf2d46f016771732a4&response_format=json
    
    Response
    {
      "response": {
        "action": "user/renew_session_token",
        "session_token": "7d31c37ae57f08951f7e50e69eaf81d2a1a8c047aabc945272e838f82e3384f4ebfe89453f888b9c3a7a777667ada551c21604493d9863e61db0593ad06a45cf2d46f016771732a4",
        "result": "Success",
        "current_api_version": "1.2"
      }
    }
    

    Set Avatar


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

    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

    Name Description Type
    quick_key The quickkey of the avatar. string
    device_revision The revision number of the cloud device. integer
    result Indicates if the API call was successful: 'Success' or 'Error' string

    Error Codes

    To view a list of possible error codes for this API, and their descriptions, click here.


    Examples:


    Example 1 (Success with XML):

    Request
    http://www.mediafire.com/api/1.2/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.2</current_api_version>
    </response>
    

    Example 2 (Success with JSON):

    Request
    http://www.mediafire.com/api/user/set_avatar.php?quick_key=naaj7pr6l1umcc2&session_token=e6829fe5892012154097c19ed0635741a6269cbe5dec2a5ae600b2d70e64b45afd03e00cd15ca0d8d17c2348933894db1ef00dda21bd098d6ba1f51f5e82f7a1a28b454f1bd399ae&response_format=json
    
    
    Response
    {
      "response": {
        "action": "user/set_avatar",
        "quick_key": "2tjwz6tw6d8i698",
        "result": "Success",
        "current_api_version": "1.2"
      }
    }
    

    Set Settings


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

    Notes: None

    Description : Set user preferences.

    Required Parameters:


    Relative 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.
    • default_share_link_status : Specifies the initial share link status for a new file. Required if previous_file_versions is not passed. enabled, disabled, inherit.

    Optional Parameters:

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


    Response Properties

    Name Description Type
    result Indicates if the API call was successful: 'Success' or 'Error' string

    Error Codes

    To view a list of possible error codes for this API, and their descriptions, click here.


    Examples:

    Example 1 (Success with XML):

    Request
    http://www.mediafire.com/api/1.2/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.2</current_api_version>
    </response>
    

    Example 2 (Success with JSON):

    Request
    http://www.mediafire.com/api/1.2/user/set_settings.php?previous_file_versions=8&default_share_link_status=disable&session_token=3f643fbbda95b7dfc4a094927a8bb23cde7bc64481f015eabca2559ae1835984c85566f97882e4c598e5702f556064e22bb9e8f6b9d12a67a7bd74e4bdd553c958e489572cd0d1fc&response_format=json
    
    
    Response
    {
      "response": {
        "action": "user/set_settings",
        "result": "Success",
        "current_api_version": "1.2"
      }
    }
    


    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.2/user/unlink_facebook.php
    POST https://www.mediafire.com/api/1.2/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.2/user/unlink_facebook.php?session_token=bf12c5a38d45cb89a6ef4bd8d02dc65d90a401127ccf1b67730f8ef349ac781a142855640c689ef8d5b5cf7ffc4d68230ca2f2fa87e30f8332cf58b3e3e2783074767a838310b29b
    
    Response
    <response>
      <action>user/unlink_facebook</action>
      <result>Success</result>
      <current_api_version>1.2</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.2/user/unlink_twitter.php
    POST https://www.mediafire.com/api/1.2/user/unlink_twitter.php

    Example:

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

    Update


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

    Description : Updates the user's personal information.

    Required Parameters:


    Relative Parameters:

    • current_password : For security, the current password of the account has to be passed when updating the email or the password.
    • subdomain : The user's subdomain.
    • company_name : The name of the sessions user's company. Required if subdomain is passed.
    • signature : This is the call signature that is required to authenticate a type 2 session token transaction.

    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.
    • 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.
    • 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.
    • response_format : 'xml' or 'json' (default 'xml')


    Response Properties

    Name Description Type
    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. string
    result Indicates if the API call was successful: 'Error or Success' string

    Error Codes

    To view a list of possible error codes for this API, and their descriptions, click here.


    Examples:


    Example 1 (Success with XML):

    Request
    http://www.mediafire.com/api/1.2/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.2</current_api_version>
    </response>
    

    Example 2 (Success with JSON):

    Request
    http://www.mediafire.com/api/user/update.php?display_name=test_display_name&first_name=test_first_name&birth_date=1999-01-01&session_token=ab951de178b31957f16a769ea69b58b5bf33f6b1bc03077c99d79d8605ed9a1e45b7edf2a9952fe18fd512bce0fa2d4f1fc1ee92215f33700be424d184e3637ca15a90108a2813fe&response_format=json
    
    
    Response
    {
      "response": {
        "action": "user/update",
        "pkey": "812f898e4c",
        "result": "Success",
        "current_api_version": "1.2"
      }
    }