首页 > 解决方案 > Uber api 集成错误 uber oauth 令牌 (invalid_scope)

问题描述

我在一家雇用 api uber 集成来控制其员工的运营和收入的公司工作。但是当使用“https://login.uber.com/oauth/v2/token”在api中进行调用时,会返回一个“error”错误:“invalid_scope”。

我们正确提供了身份验证,并且仪表板上的范围以及权限授予都正确配置。

范围 解释
client_id(细绳) 您的应用程序的客户端 ID。
client_secret(细绳) 您的应用程序的客户端密码。
grant_type(细绳) 在此步骤中,应将其设置为 client_credentials。
scope(细绳) 范围的空格分隔列表。

集成始终有效,但开始出现此范围错误。我们按照文档https://developer.uber.com/docs/businesses/references/api/v2/token-post请求收据并返回以下错误。我强调仪表板上的范围以及权限授予都已正确配置。

"error":"invalid_scope"</p>

StatusCode: 400, ReasonPhrase: 'Bad Request', Version: 1.1, Content: System.Net.Http.StreamContent, Headers:
{
  x-uber-edge: e4-dca1:w:63
  strict-transport-security: max-age=604800
  x-content-type-options: nosniff
  x-xss-protection: 1; mode=block
  x-frame-options: SAMEORIGIN
  x-envoy-upstream-service-time: 30
  Cache-Control: max-age=0
  Date: Mon, 19 Jul 2021 13:52:50 GMT
  Server: ufe
  Content-Length: 25
  Content-Type: application/json
}

标签: oauthscopeaccess-tokenuber-api

解决方案


推荐阅读