Hello guys,
I can authenticate in the live client, but after this process I can not bring the contacts on request:
$contacts = $client->api('contacts', 'GET');
This process returns error 401, I followed this contacts documentation api
In web.php
"live" => [
"class" => "yii\authclient\clients\Live",
"clientId" => 'xxxx',
"clientSecret" => 'xxxx',
'authUrl' => 'https://login.microsoftonline.com/common/oauth2/v2.0/authorize',
'tokenUrl' => 'https://login.microsoftonline.com/common/oauth2/v2.0/token',
'apiBaseUrl' =>'https://outlook.office.com/api/v2.0/me',
"returnUrl" => "http://localhost:8181/oauthclient/auth/live",
'scope'=>'openid profile offline_access User.Read Mail.Read',
"viewOptions" => ["popupWidth" => 450, "popupHeight" => 700],
],
My success:
$totalContacts = $client->api('contacts', 'GET');
print_r($totalContacts);
exit;
Version: yii2-authclient: ~2.1.4
Executed: localhost:8181