我知道有一個非常類似here。但是,這假設您正在開發一個上傳到您自己的服務器域的HTML應用程序。 當我在Google網站上工作時,如何設置API project console中的Javascript起源?Google Apps腳本 - Google Site中的origin_mismatch錯誤
我的谷歌網站的URL看起來像https://sites.google.com/a/domain-name.com/site-name/page-name。
:因爲它說,起源域不能containt像 http://example.com/subdir
- That’s an error.
Error: origin_mismatch
Application: Custom form
You can email the developer of this application at: [email protected]
Request Details immediate=false response_type=token scope= https://www.googleapis.com/auth/drive.readonly redirect_uri=postmessage proxy=oauth2relay945850002 state=845063282|0.3789568949 origin= https://n-qaqvqexe4f52wy3jge4j7oquqn5qtfw3gn4sumq-script.googleusercontent.com include_granted_scopes=true client_id=498878908299-opvf61qsrpr6en5kvh74esqbmii1nc7u.apps.googleusercontent.com authuser=0
這裏的路徑是,我得到的錯誤,我不能粘貼URL
而且this的是,我使用
你有沒有試過https://sites.google.com?在JavaScript的起源? – DaImTo
是的,沒有工作.. – maeq
該文檔指定你應該「創建新的鍵」類型的「瀏覽器鍵」,但你創建的是「客戶端ID」。客戶端ID基於回調或起源而工作,而密鑰在引用者上工作。 – abraham