devtechxm/intercomsdk

There is no license information available for the latest version (1.2) of this package.

Library for intercom client with error handling

1.2 2019-03-04 07:11 UTC

This package is not auto-updated.

Last update: 2024-05-02 05:41:07 UTC


README

Requires intercom-php v3.0.0

Using Composer:

The recommended way to install intercomsdk is through Composer:

First, install Composer:

$ curl -sS https://getcomposer.org/installer | php

Next, install the latest intercomsdk:

$ php composer.phar require devtechxm/intercomsdk

Finally, you can include the files in your PHP script:

require "vendor/autoload.php";

Clients

use Intercom\Api;

$intercom = new Api(appId, apiKey);

Users

// Get a user	
	try 
    {
    		$client = $intercom->client;
    		//same as intercom-php sdk
		$response = $client->users->getUsers(["email" => "nouser@intercom.io"]);
	}
    catch (Exception $e) 
    {
    	$response = $intercom->parseExceptionError($e);
    }
    
    echo '<pre>';
    print_r($response);

For More details visit intercom reference