PHPackages                             nextlead/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. nextlead/api-library

ActiveLibrary[API Development](/categories/api)

nextlead/api-library
====================

001PHP

Since May 6Pushed 7y ago1 watchersCompare

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

READMEChangelogDependenciesVersions (1)Used By (0)

Using the NextLead API Library
==============================

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

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

[](#requirements)

- PHP 5.3.7 or newer
- cURL support

NextLead Setup
--------------

[](#nextlead-setup)

The API must be enabled in NextLead. Within NextLead, go to the Configuration page (located in the Settings menu) and under API Settings enable NextLead'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. NextLead 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.

```
