Notifications1.2
Get Cache
    GET
    http://www.mediafire.com/api/1.2/notifications/get_cache.php
    POST
    http://www.mediafire.com/api/1.2/notifications/get_cache.php
    Description : Gets and clears a specified number of the most recent cache-only notifications for the current user.
    
    
    
Required Parameters:
- session_token : A type 1 or type 2 session token. (Type 2 will require a call signature).
Relative Parameters:
- signature : This is the call signature that is required to authenticate a type 2 session token transaction.
Optional Parameters:
- start : Number of records to skip (default 0).
- limit : Number of records to return (default 100).
- response_format : 'xml' or 'json' (default 'xml')
Response Properties
| Name | Description | Type | 
|---|---|---|
| num_older | Number of recent notifications | integer | 
| result | Indicates if the API call was successful. 'Error' or "Success' | string | 
| current_api_version | The latest stable API version number | 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/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.2</current_api_version>
</response>
        
    
    Example 2 (Success with JSON):
    
        
        Request
    
    http://www.mediafire.com/api/notifications/get_cache.php?response_format=json&session_token=0f9bff75f37d132cfe68c4dc25ab0174e0dba329263ea9e5414f181dae67e95cb3c4ccddfe56b43adb7781cf01fe0ec1f16d9d8723af0de326b4e7da47429f928146e90dfb16d8d3
    
        
        Response:
    
    
{
  "response": {
    "action": "notifications/get_cache",
    "notifications": [
      {
        "actor": "wdpiatu",
        "timestamp": "1405469190",
        "resource": "e6wzpz7hkiwq3m7",
        "viewable": "1",
        "message": "Joe Blow granted access to file \"test.jpg\""
      }
    ],
    "num_older": "0",
    "result": "Success",
    "current_api_version": "1.2"
  }
}
        
    Peek Cache
    GET
    http://www.mediafire.com/api/1.2/notifications/peek_cache.php
    POST
    http://www.mediafire.com/api/1.2/notifications/peek_cache.php
    Description : Gets the number of cache-only notifications for the current user.
    
    
    
Required Parameters:
- session_token : A type 1 or type 2 session token. (Type 2 will require a call signature).
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 | 
|---|---|---|
| num_total | Total number of notifications served to user | integer | 
| num_unread | Total number of unread notifications in the user's account | integer | 
| result | Indicates if the API call was successful. 'Error' or "Success' | string | 
| current_api_version | The latest stable API version number | string | 
Error Codes
To view a list of possible error codes for this API, and their descriptions, click here.
Examples:
Example 2 (Success with XML):
        
        Request
    
    http://www.mediafire.com/api/1.2/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.2</current_api_version>
</response>
        
    
    Example 2 (Success with JSON):
    
        
        Request
    
    http://www.mediafire.com/api/notifications/peek_cache.php?response_format=json&session_token=0f9bff75f37d132cfe68c4dc25ab0174e0dba329263ea9e5414f181dae67e95cb3c4ccddfe56b43adb7781cf01fe0ec1f16d9d8723af0de326b4e7da47429f928146e90dfb16d8d3
    
        
        Response:
    
    
{
  "response": {
    "action": "notifications/peek_cache",
    "num_total": "27",
    "num_unread": "3",
    "result": "Success",
    "current_api_version": "1.0"
  }
}
        
    Send Message
    GET
    http://www.mediafire.com/api/1.2/notifications/send_message.php
    POST
    http://www.mediafire.com/api/1.2/notifications/send_message.php
    Description : Sends a generic message with a list of file and folder keys to one or more contacts.
    
    
    
Required Parameters:
- session_token : A type 1 or type 2 session token. (Type 2 will require a call signature).
- contact_keys : A comma-separated list of contact keys.
- keys : A comma-separated list of quickkeys and folderkeys to be sent along with the message.
Relative Parameters:
- signature : This is the call signature that is required to authenticate a type 2 session token transaction.
Optional Parameters:
- message : A user-specified text message.
- message_template : Specifies the message template. 'standard' or 'access_request' (default 'standard').
- response_format : 'xml' or 'json' (default 'xml')
Response Properties
| Name | Description | Type | 
|---|---|---|
| result | Indicates if the API call was successful. 'Error' or "Success' | string | 
| current_api_version | The latest stable API version number | 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/notifications/send_message.php?session_token=SESSION_TOKEN
    
        
        Response
    
    <response>
    <action>notifications/send_message</action>
    <result>Success</result>
    <current_api_version>1.2</current_api_version>
</response>
        
    
    Example 2 (Success with JSON):
    
        
        Request
    
    http://www.mediafire.com/api/notifications/send_message.php?contact_key=s32y7h54,r54d56g&keys=f04rjb4odlg5w7e,2pfo8n929b9vh7r&response_format=json&session_token=0f9bff75f37d132cfe68c4dc25ab0174e0dba329263ea9e5414f181dae67e95cb3c4ccddfe56b43adb7781cf01fe0ec1f16d9d8723af0de326b4e7da47429f928146e90dfb16d8d3
    
        
        Response:
    
    
{
  "response": {
    "action": "notifications/send_message",
    "result": "Success",
    "current_api_version": "1.0"
  }
}