Client error: POST https://api.nuki.io/oauth/token
resulted in a 400 Bad Request
response: {“error”:“invalid_grant”,“error_description”:"The provided authorization grant (e.g., authorization code, resource owner (truncated…)
Hello
I apologzse for distribute but after many tests I have problem with guzzle on your appy. I have problem with O2Auth where still have this error
Code is here:
$client = new GuzzleHttp\Client();
$res = $client->request('POST', 'https://api.nuki.io/oauth/token', [
'auth' => ['api key', 'secret'],
'headers' => [
'Content-Type' => 'application/x-www-form-urlencoded'
],
'form_params' => [
'scope' => "account smartlock smartlock.create\nsmartlock.auth smartlock.action smartlock.log smartlock.readOnly\nsmartlock.config notification",
'redirect_uri' => 'https://primegym.cz/admin/settings/settingsnuki',
'grant_type' => 'authorization_code'
]
]);
Can help with this Or What is better library https for connect to Nuki. For me is cUrl little new.
Thank you
For sure: api key , secret and cliend id active. I am sure use active.