簡體   English   中英

不允許我保存對 appsscript.json 的編輯

[英]Won't allow me to save edits to appsscript.json

我想訪問與用戶 google 帳戶關聯的名稱來解決GoogleJsonResponseException: API call to people.people.get failed with error: The caller does not have permission to request "people/me". Request requires one of the following scopes: [profile] GoogleJsonResponseException: API call to people.people.get failed with error: The caller does not have permission to request "people/me". Request requires one of the following scopes: [profile]錯誤。

為此,我試圖將https://www.googleapis.com/auth/userinfo.profile scope 包含在 Google 的Z54699D9A7E6DF4EDBCA4053281B2458E列表中但是,在編輯 appsscript.json 以手動包含 scope(如此處所述)並嘗試保存后,它不起作用。 它顯示“正在保存項目...”彈出窗口,但它永遠不會解決並重新加載頁面會重置 appsscript.json 而無需我的更改。 scope https://www.googleapis.com/auth/userinfo具有相同的響應。 沒有與此相關的錯誤消息。

這是我當前的文件——我錯過了什么傻事嗎? 我做錯了嗎?

{
  "oauthScopes": "https://www.googleapis.com/auth/userinfo.names",
  "timeZone": "America/New_York",
  "dependencies": {
    "enabledAdvancedServices": [
      {
        "userSymbol": "People",
        "version": "v1",
        "serviceId": "peopleapi"
      }
    ]
  },
  "exceptionLogging": "STACKDRIVER",
  "runtimeVersion": "V8",
  "webapp": {
    "executeAs": "USER_DEPLOYING",
    "access": "MYSELF"
  }
}

oauthScopes應該包含一個數組或字符串。 考慮到這一點,改變

"oauthScopes": "https://www.googleapis.com/auth/userinfo.names",

經過

"oauthScopes": [ "https://www.googleapis.com/auth/userinfo.names" ],

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM