Skip to content Skip to sidebar Skip to footer

Appengine - Remote Api Returning 401 And Too-many-auth

I am trying to connect to an AppEngine instance with the remote API with something like this: os.environ['GOOGLE_APPLICATION_CREDENTIALS'] = '.../path/to/key' remote_api_stub.Confi

Solution 1:

Just encountered this issue and nothing here resolved it. The only thing that worked for me is adding the --secure option to the remote shell command

$APPENGINE/remote_api_shell.py  --secure -s my-app.appspot.com

Solution 2:

Ok, so what seemed to be necessary was:

  1. Go to the appspot.com admin page.
  2. Under Application Settings, enable Cloud Integration
  3. Create a new service account in the new cloud console page API Manager (existing service accounts do not seem to work)
  4. Switch to remote_api_stub.ConfigureRemoteApiFromServer — on further inspection, it appears that ConfigureRemoteApiForOAuth works fine.

At least after performing the above access works as expected.

I hope others similarly situated find this helpful.

Solution 3:

For people using the remote api from the command line (bulkloader.py, remote_api_shell.py etc.), a 401 error might also happen if your appengine cookies are expired.

Try deleting them and authenticating again:

rm ~/.appcfg* gcloud auth login

This could happen in cases where changes made to a Google account force logging out (e.g: enabling 2 factor authentication).

Post a Comment for "Appengine - Remote Api Returning 401 And Too-many-auth"