Hola estoy usando Onedrive-php-sdk de Krizalys para subir un archivo a mi onedrive, mi problema es que a la hora de ejecutar esta parte del código me da error:
$client = new Client(
$config['ONEDRIVE_CLIENT_ID'],
new Graph(),
new GuzzleHttpClient(),
[
// Restore the previous state while instantiating this client to proceed
// in obtaining an access token.
'state' => $_SESSION['onedrive.client.state']
]
);
// Obtain the token using the code received by the OneDrive API.
$client->obtainAccessToken($config['ONEDRIVE_CLIENT_SECRET'], "jpoUYQ9#scbvBGTS9629_{?");
echo "codigo2";
// Persist the OneDrive client' state for next API requests.
$_SESSION['onedrive.client.state'] = $client->getState();
// Past this point, you can start using file/folder functions from the SDK, eg:
$file = $client->getRoot()->upload('hello.txt', 'Hello World!');
echo $file->download('hola.txt');
El error que me da es el siguiente:
"error":"invalid_grant","error_description":"AADSTS9002313: Invalid request. Request is malformed or invalid.\r\nTrace (truncated...)
¿alquien sabe de qué puede ser?
Un saludo