Integrating infusionsoft with Laravel web app

How can I integrate infusionsoft with Laravel web application. I have tried with installing ‘composer require infusionsoft/sdk’. Then register the service provider in config/app.php. and published the config. Then set .env file with infusionsoft client I’d and secret.
Then inside controller I am using
$infusionsoft = new \Infusionsoft\Infusionsoft(array(
‘clientid’ => ‘clientid’,
‘redirectUri’ => ‘my url’,
But it is not connecting.

@Florence_Ordibehesht can you provide a bit more detail on which call isn’t working? Once you register the service provider you can then access the SDK like this \Infusionsoft::contacts()->find(123). The Service Provider sets up a singleton for the connection. As a note, you’ll have to set the token before making any calls \Infusionsoft::setToken($token)

Have you setup the OAuth2 authentication sequence? It sounds like you’re trying to use the API with your clientId and Secret instead of an OAuth2 token.

Hi Jordan,

Thanks for your concern. Still I am not able to solve the problem. I have created a developer account and created an app, used client id and client secret but it is not working. Also in developer account application status is showing ‘waiting’. My web app is using laravel framework.

If you have any specific assistance regarding infusionsoft integration with laravel please let me know.

The scenario is when any user logging in our web app i need to find that user(already have list of users in infusionsoft) by mail in infusionsoft account where their record is already created with their all details(including email id) and have to tag them with specific tag id (tag is already defined in our infusionsoft account).

I am using below code for that

Creating an Infusionsoft object:

$infusionsoft = new Infusionsoft\Infusionsoft(array(
    'clientId' => 'INFUSIONSOFT_CLIENT_ID',
    'clientSecret' => 'INFUSIONSOFT_SECRET',
    'redirectUri' => 'INFUSIONSOFT_REDIRECT_URL',

Finding Contacts/users:

$email = $request->email;
$selectedFields = array('Id', 'FirstName', 'LastName');
$result=$infusionsoft->contacts()->findByEmail($email, $selectedFields);

But it is not working. I am using link to install and setup infusionsoft in our laravel application. Also I attached a screenshot of my developer account from where i got client id and client secret and status is still showing waiting instead of active.

If your account status shows “waiting”, you have attempted to create a second developer application, which requires manual approval, as the first is always auto-approved. You’ll need to submit a support ticket to get that approval process started.