box-php-sdk
box-php-sdk copied to clipboard
internal server error on example code for authorization
getting continuous internal server error on the example code after error replacing the client_id, secret and redirect_uri. i get error on creating the object for KeyValuePair Class $keyValueStore = new KeyValueStore(new NullAdapter());
, even wrapping it inside the try catch statement doesnt show me the actual error that is occurring see below
use AdammBalogh\Box\Client\OAuthClient;
use AdammBalogh\KeyValueStore\KeyValueStore;
use AdammBalogh\KeyValueStore\Adapter\NullAdapter;
use AdammBalogh\Box\Exception\ExitException;
use AdammBalogh\Box\Exception\OAuthException;
use GuzzleHttp\Exception\ClientException;
$clientId = 'MY_CLIENT_ID';
$clientSecret = 'MY_SECRET';
$redirectUri = 'my_uri';
try{
$keyValueStore = new KeyValueStore(new NullAdapter());
$oAuthClient = new OAuthClient($keyValueStore, $clientId, $clientSecret, $redirectUri);
} catch (\Exception $ex) {
echo $ex->getMessage();
}
my Composer.json looks like following and i have added the repos for the null adapter and the memory both,
{
"require":{
"adammbalogh/box-sdk": "0.5.0",
"adammbalogh/key-value-store-null":"0.5.0",
"adammbalogh/key-value-store-memory":"0.5.0"
}
}
I've faced this too