Python 从Google App Engine访问Firebase数据库
我无法从GAE应用程序访问Firebase DB。它在本地运行时工作正常,但部署到GAE(*.appspot.com)时,我从Firebase返回了一个未经授权的错误。很可能我错过了一些显而易见的事情 这是我使用的_get_http()函数。它工作正常(在执行Python 从Google App Engine访问Firebase数据库,python,google-app-engine,firebase,firebase-realtime-database,Python,Google App Engine,Firebase,Firebase Realtime Database,我无法从GAE应用程序访问Firebase DB。它在本地运行时工作正常,但部署到GAE(*.appspot.com)时,我从Firebase返回了一个未经授权的错误。很可能我错过了一些显而易见的事情 这是我使用的_get_http()函数。它工作正常(在执行gcloud beta auth应用程序默认登录后) 我从Firebase得到的错误是: {u'error': u'Unauthorized request.'} GAE的日志包括以下内容: 11:14:43.835 Attempting
gcloud beta auth应用程序默认登录后)
我从Firebase得到的错误是:
{u'error': u'Unauthorized request.'}
GAE的日志包括以下内容:
11:14:43.835
Attempting refresh to obtain initial access_token
11:14:44.625
Refreshing due to a 401 (attempt 1/2)
11:14:44.966
Refreshing due to a 401 (attempt 2/2)
明白了!我已经把注释掉了https://www.googleapis.com/auth/userinfo.email“
认为这是不必要的。错。再次启用它,宾果
11:14:43.835
Attempting refresh to obtain initial access_token
11:14:44.625
Refreshing due to a 401 (attempt 1/2)
11:14:44.966
Refreshing due to a 401 (attempt 2/2)