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:
- Go to the appspot.com admin page.
- Under Application Settings, enable Cloud Integration
- Create a new service account in the new cloud console page API Manager (existing service accounts do not seem to work)
Switch to— on further inspection, it appears thatremote_api_stub.ConfigureRemoteApiFromServer
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"