howdylikes

Google Developersってわかりづらいよね

Drive APIの制限がかかっている場合のエラーと対処方法

Drive APIを使う際に以下のエラーが出る場合はAPIの使用が管理者によって制限されています。

{
 "error": {
  "errors": [
   {
    "domain": "global",
    "reason": "domainPolicy",
    "message": "The domain policy has disabled third-party Drive apps"
   }
  ],
  "code": 403,
  "message": "The domain policy has disabled third-party Drive apps"
 }
}

管理コンソールから ユーザーに Google ドライブ アプリケーションのインストールを許可するにチェックを入れれば使用可能になります。
f:id:howdy39:20150921222720p:plain

セキュリティを考慮してあえてチェックを外していると思われるため、変えてもらうことは難しいと思いますが。