亚洲在线久爱草,狠狠天天香蕉网,天天搞日日干久草,伊人亚洲日本欧美

為了賬號安全,請及時綁定郵箱和手機立即綁定
已解決430363個問題,去搜搜看,總會有你想問的

Gmail的OAuth2 IMAP訪問范圍是什么?

Gmail的OAuth2 IMAP訪問范圍是什么?

一只斗牛犬 2021-03-05 11:47:19
我正在使用google-api-python-client和imapclient庫來嘗試獲取對Gmail的IMAP訪問。通過身份驗證流程時,出現“無效范圍”錯誤。我已經嘗試過https://mail.google.com和https://mail.google.com/mail/feed/atom作為范圍。這是我想做的事情:from oauth2client.appengine import OAuth2DecoratorSCOPE = "https://mail.google.com"# SCOPE = "https://mail.google.com/mail/feed/atom"oauth2decorator_gmail = OAuth2Decorator(client_id="CLIENT_ID",                                   client_secret="CLIENT_SECRET",                                   scope=SCOPE,                                   callback_path='/mycallbackurl')class AuthenticateSyncServices(webapp2.RequestHandler):    @oauth2decorator_gmail.oauth_required    def get(self):        self.response.write("Authenticated")這是堆棧跟蹤:INFO     2013-06-06 08:56:36,686 client.py:1304] Failed to retrieve access token: {  "error" : "invalid_scope"}Traceback (most recent call last):  File "/Applications/GoogleAppEngineLauncher.app/Contents/Resources/GoogleAppEngine-default.bundle/Contents/Resources/google_appengine/lib/webapp2-2.5.1/webapp2.py", line 1536, in __call__    rv = self.handle_exception(request, response, e)  File "/Applications/GoogleAppEngineLauncher.app/Contents/Resources/GoogleAppEngine-default.bundle/Contents/Resources/google_appengine/lib/webapp2-2.5.1/webapp2.py", line 1530, in __call__    rv = self.router.dispatch(request, response)  File "/Applications/GoogleAppEngineLauncher.app/Contents/Resources/GoogleAppEngine-default.bundle/Contents/Resources/google_appengine/lib/webapp2-2.5.1/webapp2.py", line 1278, in default_dispatcher    return route.handler_adapter(request, response)
查看完整描述

1 回答

  • 1 回答
  • 0 關注
  • 216 瀏覽
慕課專欄
更多

添加回答

舉報

0/150
提交
取消
微信客服

購課補貼
聯系客服咨詢優惠詳情

幫助反饋 APP下載

慕課網APP
您的移動學習伙伴

公眾號

掃描二維碼
關注慕課網微信公眾號