javascript - Chrome 应用 "Bad client id: UNSUPPORTED"

标签 javascript google-chrome-app

我在我的 list 文件中设置了一个与我在 google api 控制台中创建的匹配的客户端 ID。

我将其创建为应用程序客户端 ID。

list .json:

"oauth2": {
    "client_id": "mysecretclientID",
    "scopes": [
      "https://www.googleapis.com/auth/drive"
    ]
}

我正在使用以下代码在我的 chrome 应用程序的开发控制台中对此进行测试:

chrome.identity.getAuthToken({interactive: false}, function(token){console.log(token);})

这个错误是什么意思?

最佳答案

我需要在设置客户端 ID 时选择 chrome 应用程序,并且我需要在本地测试时添加我的应用程序 ID,当启用开发者模式时,可以在 chrome://extensions 中找到它。

enter image description here

关于javascript - Chrome 应用 "Bad client id: UNSUPPORTED",我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/30349890/

相关文章:

javascript - javascript如何获取其他网站的数据?

javascript - Vue.js 绑定(bind)对象属性

javascript - firefox 25 没有为音频标签定义 play() ?

javascript - 处理 Chrome 应用程序窗口外部的点击

javascript - Chrome 开发者工具 : paused before potential out-of-memory crash

javascript - 为什么 Firefox 提示此 javascript for 循环中的分号?

javascript - Chrome Extension : While Capturing Desktop, 所选窗口集中在前面

javascript - 如何通过单击 html 页面中的按钮来启动 Chrome 打包应用程序

android - weinre 调试工具在适用于 android 的 cordova chrome 应用程序(cca)中不起作用

javascript - HTML5-可以在没有浏览器的情况下运行吗?