0
구독 목록 또는 사용자 목록을 검색하는 동안 모든 데이터를 Google의 자체 비즈니스 시스템과 동기화하는 데 문제가 있습니다.Google Apps API - 구독 또는 사용자 목록 얻기
{
"error": {
"errors": [
{
"domain": "global",
"reason": "conditionNotMet",
"message": "Provisioning API is disabled for your domain. Please enable it in your Google Apps Control Panel.",
"locationType": "header",
"location": "If-Match"
}
],
"code": 412,
"message": "Provisioning API is disabled for your domain. Please enable it in your Google Apps Control Panel."
}
}
나는 구글 PHP 라이브러리를 사용하고, 이것은 기본적으로 구글의 예제 라이브러리에서 약간 변형 예이다 내가 사용하고있는 코드입니다.
$client->setScopes(array(
'https://www.googleapis.com/auth/apps.order', // As required by the google api docs for /subscription
));
/**
* Google's own example code
*/
if (isset($_GET['code'])) {
$client->authenticate();
$_SESSION['access_token'] = $client->getAccessToken();
$redirect = 'http://' . $_SERVER['HTTP_HOST'] . $_SERVER['PHP_SELF'];
header('Location: ' . filter_var($redirect, FILTER_SANITIZE_URL));
}
if (isset($_SESSION['access_token'])) {
$client->setAccessToken($_SESSION['access_token']);
}
if ($client->getAccessToken()) {
$url = 'https://www.googleapis.com/apps/reseller/v1';
//$url = 'https://www.googleapis.com/apps/reseller/v1sandbox/'; // sandbox mode overwrite
$req = new Google_HttpRequest($url .'/subscriptions', 'GET');
$resp = $client::getIo()->authenticatedRequest($req);
print "<h1>Subscriptions</h1>: <pre>" . $resp->getResponseBody() . "</pre>";
프로비저닝 API는 사용되지 않습니다 나는, 나는 내가 프로비저닝 (Provisioning) API의 오류가있는 이유 누군가가 알고있을 바라고 여기 부탁 해요 내 문제에 대한 해결책을 찾는 데에 실패 해요입니다.