1. Go to this page and download the library: Download akamai-open/edgegrid-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/ */
akamai-open / edgegrid-client example snippets
// Library is ready to use
$client = \Akamai\Open\EdgeGrid\Client::createFromEdgeRcFile('{credentials_section_name}', '{path/to/.edgerc}');
// Use $client just as you would \Guzzle\Http\Client
$response = $client->get('/identity-management/v3/user-profile');
$client = new Akamai\Open\EdgeGrid\Client([
'base_uri' => 'https://akab-h05tnam3wl42son7nktnlnnx-kbob3i3v.luna.akamaiapis.net'
]);
$client_token = 'akab-c113ntt0k3n4qtari252bfxxbsl-yvsdj';
$client_secret = 'C113nt53KR3TN6N90yVuAgICxIRwsObLi0E67/N8eRN=';
$access_token = 'akab-acc35t0k3nodujqunph3w7hzp7-gtm6ij';
$client->setAuth($client_token, $client_secret, $access_token);
// use $client just as you would \Guzzle\Http\Client
$response = $client->get('/identity-management/v3/user-profile');
ent = \Akamai\Open\EdgeGrid\Client::createFromEdgeRcFile('default');
// use $client just as you would \Guzzle\Http\Client
$response = $client->get('/identity-management/v3/user-profile');
echo $response->getBody();