[英]Groups Migration API returning invalid token…from OAuth2 Playground
我正在嘗試編寫一個腳本,將舊電子郵件遷移到Google網上論壇。 我一直在Google的OAuth2 Playground( https://developers.google.com/oauthplayground/中提出請求,但我一直收到由和invalid_token引起的401錯誤。
在操場上,我選擇了組遷移API( https://www.googleapis.com/auth/apps.groups.migration ),獲得了授權代碼,並將其交換為access_token。 看來一切進展順利。 然后,我對此URL發出了POST請求。
https://www.googleapis.com/upload/groups/v1/groups/TEST_GROUP@googlegroups.com/archive?uploadType=media
我有以下兩個標題:
Content-Type : message/rfc822 uploadType : media
我應該收到有關標頭中缺少某些信息的錯誤,但我卻得到了身份驗證錯誤。
HTTP/1.1 401 Unauthorized Alternate-protocol: 443:quic,p=0.002 Content-length: 251 Via: HTTP/1.1 GWA X-google-cache-control: remote-fetch Server: UploadServer ("Built on Sep 18 2014 17:00:06 (1411084806)") Date: Fri, 26 Sep 2014 15:56:13 GMT Content-type: application/json; charset=UTF-8 Www-authenticate: Bearer realm="https://accounts.google.com/AuthSubRequest", error=invalid_token { "error": { "code": 401, "message": "Authorization Failed", "errors": [ { "locationType": "header", "domain": "global", "message": "Authorization Failed", "reason": "authError", "location": "Authorization" } ] }
登錄到作為我創建的Google網上論壇帳戶管理員的電子郵件時,我已獲得身份驗證同意。
知道我怎么了嗎?
編輯:添加標頭信息和說明符,我在此處發出此請求(Google Oauth游樂場的URL)
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.