title: Google Appengine Remote API auth
body: <p>I've been using the remote API for google appengine for a couple years. Several months ago I updated to the Oauth2 authorization approach as documented here and everything has worked fine for months.</p>
  
  <p><a href="https://cloud.google.com/appengine/docs/java/tools/remoteapi" rel="nofollow">https://cloud.google.com/appengine/docs/java/tools/remoteapi</a></p>
  
  <p>Today I ran into the following error</p>
  
  <pre><code>Exception in thread "main" com.google.appengine.repackaged.com.google.api.client.http.HttpResponseException: 401 Unauthorized
  You must be logged in as an administrator, or access from an approved application.
  </code></pre>
  
  <p>I don't understand what changed or how to resolve it. I've made sure that I'm logged in with the correct account by using the following command.</p>
  
  <pre><code>gcloud auth login
  </code></pre>
  
  <p>Which successfully logs me in.</p>
  
  <p>The account that I use to login, is a google apps account which I suspect is the problem. I think the integration of google apps accounts with appengine has changed based on this old, but seemingly related question.</p>
  
  <p><a href="https://code.google.com/p/googleappengine/issues/detail?id=1462" rel="nofollow">https://code.google.com/p/googleappengine/issues/detail?id=1462</a></p>
  
  <p>Any help would be appreciated. Thank you!</p>