User1.0

Accept Terms of Service


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

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.0/user/accept_tos.php
POST http://www.mediafire.com/api/1.0/user/accept_tos.php

Example:

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


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.0/user/accept_tos.php
POST http://www.mediafire.com/api/1.0/user/accept_tos.php

Example:

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


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.0/user/destroy_action_token.php
POST http://www.mediafire.com/api/1.0/user/destroy_action_token.php

Example:

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


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.0/user/fetch_tos.php
POST http://www.mediafire.com/api/1.0/user/fetch_tos.php

Example:

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


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.0/user/fetch_tos.php
POST http://www.mediafire.com/api/1.0/user/fetch_tos.php

Example:

Request
http://www.mediafire.com/api/1.0/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.0</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.0/user/get_action_token.php
POST http://www.mediafire.com/api/1.0/user/get_action_token.php

Example 1:

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


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.0/user/get_avatar.php
POST http://www.mediafire.com/api/1.0/user/get_avatar.php

Example:

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

Get Info


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

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.0/user/get_info.php
POST http://www.mediafire.com/api/1.0/user/get_info.php

Example:

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

Property: options
This is a bit-mask value indicating special details about the user settings. The following is a list of bits and their meanings:

  • 0: Internal MediaFire notation
  • 1: Internal MediaFire notation
  • 2: Internal MediaFire notation
  • 3: Internal MediaFire notation
  • 4: Internal MediaFire notation
  • 5: For future use
  • 6: For future use
  • 7: For future use
  • 8: 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


Get Limits


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

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.0/user/get_limits.php
POST http://www.mediafire.com/api/1.0/user/get_limits.php

Example:

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

  • email : The email address of the user's MediaFire account.
  • 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.0/user/get_login_token.php
POST SSL Required https://www.mediafire.com/api/1.0/user/get_login_token.php

Example:

Request
https://www.mediafire.com/api/1.0/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. Not required if you pass fb_session_token.
  • password : The password of the user's MediaFire account. Not required if you pass fb_session_token. This can also be permanent_token returned by user/get_session_token in case the user logged in with Facebook on SSL mode using the Desktop Application.
  • 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.0/user/get_session_token.php
POST SSL Required https://www.mediafire.com/api/1.0/user/get_session_token.php

Example 1:

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

Example 3 (JSON):

Request
https://www.mediafire.com/api/1.0/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.0"
    }
}

Example 4 (invalid signature=error):

Request
https://www.mediafire.com/api/1.0/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.0</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.0/user/get_settings.php
POST http://www.mediafire.com/api/1.0/user/get_settings.php

Example:

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

Example:

Request
http://dev.mediafire.com/api/1.0/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.0</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.
OR
  • fb_access_token : The Facebook access token to register directly using a Facebook email (this must be obtained from Facebook's API).

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.0/user/register.php
POST SSL Required https://www.mediafire.com/api/1.0/user/register.php

Example:

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

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

Example:

Request
https://www.mediafire.com/api/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.0/user/renew_session_token.php
POST https://www.mediafire.com/api/1.0/user/renew_session_token.php

Example:

Request
http://www.mediafire.com/api/1.0/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.0</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')


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

Example:

Request
http://www.mediafire.com/api/1.0/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.0</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')


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

Example:

Request
http://www.mediafire.com/api/1.0/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.0</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.0/user/unlink_facebook.php
POST https://www.mediafire.com/api/1.0/user/unlink_facebook.php

Example:

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

Example:

Request
http://www.mediafire.com/api/1.0/user/unlink_twitter.php?session_token=bf12c5a38d45cb89a6ef4bd8d02dc65d90a401127ccf1b67730f8ef349ac781a142855640c689ef8d5b5cf7ffc4d68230ca2f2fa87e30f8332cf58b3e3e2783074767a838310b29b
    
Response
<response>
  <action>user/unlink_twitter</action>
  <result>Success</result>
  <current_api_version>1.0</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.0/user/update.php
POST https://www.mediafire.com/api/1.0/user/update.php

Example:

Request
http://www.mediafire.com/api/1.0/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.0</current_api_version>
</response>
Note: pkey can be used to determine when the user's password has changed.