PHPackages                             leadsengage/api-library - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [API Development](/categories/api)
4. /
5. leadsengage/api-library

ActiveLibrary[API Development](/categories/api)

leadsengage/api-library
=======================

Leadsengage API Connector Library

03PHP

Since May 17Pushed 8y agoCompare

[ Source](https://github.com/vivekssharma07/api-library)[ Packagist](https://packagist.org/packages/leadsengage/api-library)[ RSS](/packages/leadsengage-api-library/feed)WikiDiscussions master Synced 3d ago

READMEChangelogDependenciesVersions (1)Used By (0)

Using the Leadsengage API Library
=================================

[](#using-the-leadsengage-api-library)

Requirements
------------

[](#requirements)

- PHP 5.3.7 or newer
- cURL support

Leadsengage Setup
-----------------

[](#leadsengage-setup)

The API must be enabled in Leadsengage. Within Leadsengage, go to the Configuration page (located in the Settings menu) and under API Settings enable Leadsengage's API. If you intend on using Basic Authentication, ensure you enable it. You can also choose which OAuth protocol to use here. After saving the configuration, go to the API Credentials page (located in the Settings menu) and create a new client. Enter the callback/redirect URI that the request will be sent from. Click Apply then copy the Client ID and Client Secret to the application that will be using the API.

Authorization
-------------

[](#authorization)

### Obtaining an access token

[](#obtaining-an-access-token)

The first step is to obtain authorization. Leadsengage supports OAuth 1.0a and OAuth 2 however it is up to the administrator to decide which is enabled. Thus it is best to have a configuration option within your project for the administrator to choose what method should be used by your code.

```
