【问题标题】:Access token does not have edit scope error访问令牌没有编辑范围错误
【发布时间】:2021-07-02 14:42:00
【问题描述】:

我正在使用 node.js SDK 来访问 Vimeo API。我正在尝试批量编辑我的专辑(展示)描述符和名称。我已经创建了我的 Vimeo API 应用程序并启用了“编辑”访问权限。可悲的是,当我运行代码时,它返回一个错误,告诉我我的访问令牌没有“编辑”\ 范围。下面是我用来发送请求的代码 sn-p:

async function setDescriptors(albumPath, newTitle, description) {
  const vimeo = await ensureVimeoClient();//Checks the connection before proceeding
  console.log("Album path: " + albumPath + "\n" + description);
  return await vimeo.request({
        method: 'PATCH',
        path: albumPath,
        params: {
          'name': newTitle,
          'description': description
        }
      }, function (error, body, statusCode, headers) {
        if (error) {
          console.log('There was an error making the request.')
          console.log('Server reported: ' + error)
          return
        }
  })
}

对我为什么会收到错误有任何想法吗?以下是确切的消息: 服务器报告:错误:{“错误”:“您的访问令牌没有“编辑”范围”}

【问题讨论】:

    标签: vimeo vimeo-api


    【解决方案1】:

    在您生成访问令牌 (https://developer.vimeo.com/apps) 的开发者网站上,您需要生成一个经过身份验证的访问令牌,其范围为“public”、“private”和“edit”。

    【讨论】:

    • 我已经按照您的描述设置了访问令牌。我仔细检查了它。
    猜你喜欢
    • 2016-09-18
    • 2020-10-05
    • 2021-08-26
    • 2014-03-05
    • 1970-01-01
    • 2023-03-15
    • 1970-01-01
    • 2016-04-24
    • 2012-01-23
    相关资源
    最近更新 更多