Set your default language: PHP | Curl

DELETE users/:id/listen

Make the authenticated user stop listening to the given user.

Details

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

Parameters

Parameter Required Notes
access_token Access token of authenticated user. This is the token of the user who will no longer listen to the user specified by the :id parameter.
:id ID for the user to stop listening to.
username Provide the 'username' param if the :id used in the API call is a username rather than a user id

Errors

In addition to the general errors documented, the following special errors may also be applicable:
Error Code Notes
400 If the user ID to stop listening to is the same as the authenticated user.

Example Usage

DELETE https://api.heello.com/users/2/listen
curl \
-d "access_token=ACCESS_TOKEN" \
-X DELETE "https://api.heello.com/users/2/listen.json"
// 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{
  // Response is user object of user listened to
  $response = $api->users->unlisten(array(
    "id" => 1
  ));

  print_r($response);
}
catch (Exception $e){
  print $e->getMessage();
}
On a successul request, a '200 OK' response is sent
with a user object for the user no longer being listened to.

See endpoint documentation for users/show for details.

Live Demo

Live demo is not currently supported for this endpoint.