このページで google-api-java-client を使用すると、いくつかのフローについて読むことができます。
サービス アカウント フローは、カレンダー API で正常に動作します。
GoogleCredential credential = new GoogleCredential.Builder().setTransport(HTTP_TRANSPORT)
.setJsonFactory(JSON_FACTORY)
.setServiceAccountId("[[]]")
.setServiceAccountScopes(CalendarScopes.CALENDAR)
.setServiceAccountPrivateKeyFromP12File(new File("key.p12")).build();
しかし、私たちは常に次のことを行っています。
503 Service Unavailable
{
"code" : 503,
"errors" : [ {
"domain" : "global",
"message" : "Backend Error",
"reason" : "backendError"
} ],
"message" : "Backend Error"
}
使用する場合GroupssettingsScopes.APPS_GROUPS_SETTINGS
(API コンソールは、このリクエストに対するアクセスを許可します)。
GApps アカウントのグループを管理するには、古い 2 脚の OAuth 1.0a に近いメカニズムを使用する必要があります。
よろしくお願いします