<?php require __DIR__ . "/../vendor/autoload.php"; use Grovo\Api\Client\GrovoApi; $clientId = '5FCE1A21s8f80A96o7E6gAIkucy938'; $clientSecret = '8uXnInPfsXKc6087YE83s8z74B7oyY'; $accessToken = ''; //OPTIONAL $client = new GrovoApi($clientId, $clientSecret, $accessToken, function ($newToken) { // This will be invoked if your existing token has expired // or you did not provide one originally. // // Use this callback to persist this token somewhere so you // can pass it in in the future. }); $parameters = ['email' => '*****@*****.**', 'first_name' => 'Grovo', 'last_name' => 'Partner']; $response = $client->addUser($parameters); print_r($response);
<?php require __DIR__ . "/../vendor/autoload.php"; use Grovo\Api\Client\GrovoApi; $clientId = '5FCE1A21s8f80A96o7E6gAIkucy938'; $clientSecret = '8uXnInPfsXKc6087YE83s8z74B7oyY'; $accessToken = ''; //OPTIONAL $client = new GrovoApi($clientId, $clientSecret, $accessToken, function ($newToken) { // This will be invoked if your existing token has expired // or you did not provide one originally. // // Use this callback to persist this token somewhere so you // can pass it in in the future. }); $response = $client->removeUser(49); print_r($response);
<?php require __DIR__ . "/../vendor/autoload.php"; use Grovo\Api\Client\GrovoApi; $clientId = '5FCE1A21s8f80A96o7E6gAIkucy938'; $clientSecret = '8uXnInPfsXKc6087YE83s8z74B7oyY'; $accessToken = ''; //OPTIONAL $client = new GrovoApi($clientId, $clientSecret, $accessToken, function ($newToken) { // This will be invoked if your existing token has expired // or you did not provide one originally. // // Use this callback to persist this token somewhere so you // can pass it in in the future. }); $parameters = ['email' => '*****@*****.**', 'first_name' => 'Grovo', 'last_name' => 'Partner']; $response = $client->updateUser(43, $parameters); print_r($response);