Google Apps Marketplace アプリを作成し、Google Apps Provisioning API を呼び出して Google Apps ドメインのすべてのユーザーのリストを取得しようとしていますが、このエラーを回避できません:
#<Net::HTTPBadRequest 400 Bad Request readbody=true>
私が使用しているコードは次のとおりです。
consumer = OAuth::Consumer.new(my_google.oauth_key,
my_google.oauth_secret,
:site => 'https://apps-apis.google.com/a/feeds/user/#readonly',
:http_method => :get)
access_token = OAuth::AccessToken.new consumer
result = access_token.get("https://apps-apis.google.com/a/feeds/my_domain.com/user/2.0?alt=json")
Google Apps マニフェスト ファイルにもこれがあります。
<Scope id="scopeUsers">
<Url>https://apps-apis.google.com/a/feeds/user/#readonly</Url>
<Reason>Our App will be setup for your entire domain.</Reason>
</Scope>
私は oauth_key とシークレットを確認し、他の多くの可能性を試しましたが、これを突き止めることはできません. ここに欠けているものはありますか?私が試すことができる他のオプションはありますか?