API 卷曲:
curl --location 'https://login.uber.com/oauth/v2/token' \
\--header 'Content-Type: application/x-www-form-urlencoded' \
\--data-urlencode 'client_secret=SECRET_FROM_APPLICATIONS_DASHBOARD' \
\--data-urlencode 'client_id=CLIENTID_FROM_APPLICATIONS_DASHBOARD' \
\--data-urlencode 'grant_type=client_credentials' \
\--data-urlencode 'scopes=guests.trips'
文档链接:https://developer.uber.com/docs/guest-rides/guides/authentication
我期待它给予:
{
"access_token": "{TokenValue}",
"token_type": "Bearer",
"expires_in": 2592000,
"scope": "guests.trips"
}
但我将其作为邮递员的输出:
{
"error": "invalid_scope",
"error_description": "scope(s) are invalid"
}
除了上面提到的之外,我没有进行任何其他 API 调用。在调用此端点之前我需要执行任何操作吗?如果不需要,那么为什么会出现无效范围作为输出。