PHP code example of monscierge / php-sdk

1. Go to this page and download the library: Download monscierge/php-sdk library. Choose the download type require.

2. Extract the ZIP file and open the index.php.

3. Add this code to the index.php.
    
        
<?php
require_once('vendor/autoload.php');

/* Start to develop here. Best regards https://php-download.com/ */

    

monscierge / php-sdk example snippets


$client = new \Monscierge\Client($client_id, $client_secret);

$oauth_token = $client->clientCredentialsExchange('uber4cats', 'nom0res3crets');

$authorize_url = $client->authorizeUrl('http://example.app/monscierge/callback');

$oauth_token = $client->basicCredentialsExchange('[email protected]', '123456');

$client->setAccessToken($oauth_token['access_token']);

$client->refreshTokenExchange($oauth_token['refresh_token']);

$client->places('San Francisco');

$client->userRequests();