Set your default language: PHP | Curl

GET users/notifications

Used for retrieving a given user's notifications. The type of notification will dictate the data returned.

Details

URL https://api.heello.com/users/notifications.format
Requires Authentication Yes
Rate Limited Yes
Response Formats json

Parameters

Parameter Required Notes
access_token Access token of authenticated user to get the notifications for.
min_id Limit the result to no notifications lower than this ID. This is useful for 'pull to refresh' functionality.

For example, you would take the last notification ID that the user has seen and set that as the min_id- No notifications with an id lower than that will be returned in the notifications response.
max_id Limit the result to no notifications higher than this ID. This is useful for paging to the next page of notifications.

For example, if you pull a page of 20 notifications, and the last ID on the first page is 7838483, to get the next page, you would set that as the max_id, and all of the notifications returned will have an ID less than 7838483.

The result is non-inclusive, and WILL NOT contain the notification data for 7838483.
count The number is notifications you want returned. You can set this up to 200 max, after which we will limit the result to the last 200 notifications.

Errors

There are no unique error states for this endpoint, please see our page detailing general errors you may encounter.

Example Usage

GET https://api.heello.com/users/notifications.json
curl https://api.heello.com/users/notifications.json?access_token=ACCESS_TOKEN&count=50
// Note: PHP Examples use the Heello PHP Client library
// https://github.com/Heello/heello-php
require_once dirname(dirname(dirname(__FILE__))) . '/Heello.php';

// You can get an Application Key and Secret by visiting:
// http://developer.heello.com/apps
$api_application_key = "APPLICATION_KEY";
$api_application_secret = "APPLICATION_SECRET";

// You can get an access token and refresh token by implementing the auth
// flow described at (or use the demo provided):
// http://developer.heello.com/guides/authentication
$access_token = "ACCESS_TOKEN";

$api = new Heello\Client($api_application_key, $api_application_secret);
Heello\Client::config()->set_access_token($access_token);

try{
  // Array of notifications for the auth'd user
  $notifications = $api->users->notifications(array(
    "count" => 1
  ));

  print_r($notifications);
}
catch (Exception $e){
  print $e->getMessage();
}
Please use the "Live Demo" below to see an example response.
You may need to login or create an account before making requests against the API.

Live Demo

Please login and create an application to perform live API testing.