Closed ghost closed 4 years ago
Hi Jeremy,
You have to register your integration first at the Teamleader Marketplace as described in the Readme: Teamleader API v2 works with OAuth2. This means your application needs to be registered on the Teamleader Marketplace (you can keep them private though).
Please also read this: https://developer.teamleader.eu/#/introduction/authentication
You can register your integration here: https://marketplace.teamleader.eu/nl/en/build/integrations
Hi,
The thing is, i've already registered the application before sending the new client information that's why i'm asking you where i make an error :D
I am guessing you are using this example? Can you please confirm you did the following:
<?php
$clientId = 'your-client-id';
$clientSecret = 'your-client-secret';
Please let me know if this helps. Of course, this is the example code. In your real application you should integrate the acquiring access token flow in your application.
Hi !
I'm using this example : https://github.com/janhenkes/teamleader-php-sdk/blob/master/examples/add-contact.php
I will answer in the same order as you did for your questions :
Yes i have a credentials.php file with my client id and my client secret
I'm working on a local environment, i'm using "teamleader-php-sdk.me" as url name. SSL is activated.
I don't know where i made a mistake but it's working now so, THANK YOU really a big THANK YOU for your help !
NP :-)
Hi,
I'm trying to make a script to send datas from a website form to teamleader. But when i test your sdk, it return me an error :
Fatal error: Uncaught Teamleader\Exceptions\InvalidAccessTokenException: Invalid access token, please acquire a new one. in C:\laragon\www\APITL\vendor\janhenkes\teamleader-php-sdk\src\Teamleader\Connection.php:322 Stack trace: #0 C:\laragon\www\APITL\vendor\janhenkes\teamleader-php-sdk\src\Teamleader\Connection.php(398): Teamleader\Connection->createRequest('POST', 'https://api.tea...', '{"first_name":"...') #1 C:\laragon\www\APITL\vendor\janhenkes\teamleader-php-sdk\src\Teamleader\Actions\Storable.php(34): Teamleader\Connection->post('contacts.add', '{"first_name":"...') #2 C:\laragon\www\APITL\vendor\janhenkes\teamleader-php-sdk\src\Teamleader\Actions\Storable.php(20): Teamleader\Entities\CRM\Contact->insert() #3 C:\laragon\www\APITL\SDK.php(19): Teamleader\Entities\CRM\Contact->save() #4 {main} thrown in C:\laragon\www\APITL\vendor\janhenkes\teamleader-php-sdk\src\Teamleader\Connection.php on line 322
This error come with your "addClient" example