我已在我的Web服務器上安裝了Google Drive Realtime API示例文件,其範圍爲these instructions,包括在Cloud Console中生成client_id並將其插入到index.html
文件中。錯誤:invalid_client沒有註冊來源
當我訪問該網頁並點擊按鈕授權的應用程序,它會彈出一個新窗口,並顯示:
Error: invalid_client
no registered origin
請求的詳細內容是:
openid_connect_request=true
cookie_policy_enforce=false
scope=https://www.googleapis.com/auth/drive.install https://www.googleapis.com/auth/drive.file https://www.googleapis.com/auth/plus.me
response_type=token
access_type=online
redirect_uri=postmessage
proxy=oauth2relay865404532
origin=http://mywebsite.com
state=264939258|0.165356673
display=page
client_id=1077585001321.apps.googleusercontent.com
authuser=0
我可以」請參閱我應在雲控制檯中使用的任何其他client_id。有誰知道如何克服這個錯誤?謝謝你的幫助。
偉大的答案,正是解決我的問題! –
我想知道'如何進入授權JavaScript origins'的本地主機URL。因爲我在本地主機上工作,在輸入本地主機URL爲'http:127.0.0.1/myProjectName'後,它拋出'Origin URIs must not包含一個路徑:http://127.0.0.1/myProjectName/' – Daenarys
你只要說'http:// localhost:13091'(不管你的本地主機是什麼)而不提你的項目名稱 - 爲我工作!感謝這個答案! – sim1