Notifications1.0

Get Cache


Description : Gets and clears a specified number of the most recent cache-only notifications for the current user.

Required Parameters


Optional Parameters
  • signature : This is the call signature that is required to authenticate a type 2 session token transaction.
  • start : Number of records to skip (default 0).
  • limit : Number of records to return (default 100).
  • response_format : 'xml' or 'json' (default 'xml')
Note: Calling this API will decrement the number of unviewed notifications appropriately.


GET http://www.mediafire.com/api/1.0/notifications/get_cache.php
POST http://www.mediafire.com/api/1.0/notifications/get_cache.php

Example:

Request
http://www.mediafire.com/api/1.0/notifications/get_cache.php?session_token=SESSION_TOKEN
Response:
<response>
    <action>notifications/get_cache</action>
    <notifications>
        <notification>
            <actor>CONTACT_KEY</actor>
            <timestamp>TIMESTAMP</timestamp>
            <message>Joe Blow granted access to file "test.jpg"</message>
            <resource>QUICKKEY</resource>
            <viewable>1</viewable>
        </notification>
    </notifications>
    <num_older>0</num_older>
    <result>Success</result>
    <current_api_version>1.0</current_api_version>
</response>

Peek Cache


Description : Gets the number of cache-only notifications for the current 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/notifications/peek_cache.php
POST http://www.mediafire.com/api/1.0/notifications/peek_cache.php

Example:

Request
http://www.mediafire.com/api/1.0/notifications/peek_cache.php?session_token=SESSION_TOKEN
Response
<response>
    <action>notifications/peek_cache</action>
    <num_total>27</num_total>
    <num_unread>3</num_unread>
    <result>Success</result>
    <current_api_version>1.0</current_api_version>
</response>

Send Message


Description : Sends a generic message with a list of file and folder keys to one or more contacts.

Required Parameters


Optional Parameters
  • signature : This is the call signature that is required to authenticate a type 2 session token transaction.
  • message : A user-specified text message.
  • message_template : Specifies the message template. 'standard' or 'access_request' (default 'standard').
  • fb_access_token : The Facebook Access Token of the Facebook user for whom you would like to send a message.
  • tw_oauth_token : The Twitter OAuth Token of the Twitter user for whom you would like to send a message.
  • tw_oauth_token_secret : The Twitter OAuth Token Secret Key.
  • response_format : 'xml' or 'json' (default 'xml')


GET http://www.mediafire.com/api/1.0/notifications/send_message.php
POST http://www.mediafire.com/api/1.0/notifications/send_message.php

Example:

Request
http://www.mediafire.com/api/1.0/notifications/send_message.php?session_token=SESSION_TOKEN
Response
<response>
    <action>notifications/send_message</action>
    <result>Success</result>
    <current_api_version>1.0</current_api_version>
</response>