PHP code example of keystackapp / keystack-php-auth-client

1. Go to this page and download the library: Download keystackapp/keystack-php-auth-client 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/ */

    

keystackapp / keystack-php-auth-client example snippets





apiInstance = new KeyStackApp\Authentication\Api\AuthenticationApi(
    // If you want use custom http client, pass your client which implements `Psr\Http\Client\ClientInterface`.
    // This is optional, `Psr18ClientDiscovery` will be used to find http client. For instance `GuzzleHttp\Client` implements that interface
    new GuzzleHttp\Client()
);
$loginInput = new \KeyStackApp\Authentication\Model\LoginInput(); // \KeyStackApp\Authentication\Model\LoginInput | The input parameters for the login endpoint.

try {
    $result = $apiInstance->login($loginInput);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling AuthenticationApi->login: ', $e->getMessage(), PHP_EOL;
}