php - Getting unauthorized client from Twinfield API
one text
i am using the https://github.com/php-twinfield/twinfield library for interacting with the Twinfield API. However, i have not been able to get past authentication.
My API information:
My code:
$provider = new \PhpTwinfield\Secure\Provider\OAuthProvider([
'clientId' => '{THE CLIENT ID FROM THE SCREENSHOT}',
'clientSecret' => '{THE CLIENT SECRET FROM THE SCREENSHOT}',
'redirectUri' => 'https://blubwebsites.nl'
]);
$accessToken = $provider->getAccessToken("authorization_code", ["code" => '{TOKEN GENERATED BY https://login.twinfield.com/auth/authentication/connect/authorize}']);
$refreshToken = $accessToken->getRefreshToken();
$connection = new \PhpTwinfield\Secure\OpenIdConnectAuthentication($provider, $refreshToken);
However, when i try this code. I get the error unauthorized_client
. I have no idea where this is coming from and why this is happening. Can anybody help me?