1. Go to this page and download the library: Download ekoapp/eko-oauth-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/ */
ekoapp / eko-oauth-sdk example snippets
use EkoApp\OAuth\EkoOAuthClient;
$client = new EkoOAuthClient();
$client->setClientId(CLIENT_ID);
$client->setClientSecret(CLIENT_SECRET);
$client->setRedirectUri(REDIRECT_URI);
$client->setEkoUri(EKO_URI);
$_SESSION['state'] = $client->createState();
// DO NOT forget to store this state into the session to validate it when Eko redirect back to your endpoint
$authEndpointUrl = $client->createAuthenticateUrl($_SESSION['state']);