You need to enable JavaScript to run this app.
优惠活动
大模型
产品
解决方案
定价
更多

从UPS API获取授权码出错,求需调整的配置方案

UPS OAuth授权码获取失败求助

我们正在调用UPS的OAuth授权端点获取授权码,使用的API地址是:https://wwwcie.ups.com/security/v1/oauth/authorize

请求携带的必填查询参数如下:

  • client_id:xxxxxxxxxxxxxxxxxxxxxxxxxxxx
  • redirect_uri:https://example.io/
  • response_type:code

我们已经尝试添加或移除以下两个可选参数:

  • state:ups
  • scope:试过shipping、rating、tracking、ship等多个不同值

但始终收到如下错误:

Could not get any response
Failed to fetch

Why this might have happened:

  • CORS is misconfigured on the server
  • The server could not send a response
  • No internet access
  • Documentation issue - contact API owner
  • Misconfigured security definition

我们还尝试了官方文档提供的Python代码,但运行后没有任何输出:

import requests

url = "https://wwwcie.ups.com/security/v1/oauth/authorize"

query = {
  "client_id": "xxxxxxxxxxxxxxxxxxxxxxxxxxxx",
  "redirect_uri": "https://example.io/",
  "response_type": "code",
  "state": "string",
  "scope": "tracking"
}

response = requests.get(url, params=query)

data = response.json()
print(data)

烦请告知需要调整哪些配置才能解决这个问题?

内容的提问来源于stack exchange,提问作者Honey Anand2

相关产品推荐
方舟 Agent Plan

超全模态模型 × Harness 升级,最新支持 Deepseek-V4.1-Flash、GLM-5.3 系列、Doubao-Seedream-5.0-pro、Kimi-K3 (部分), 限时 9.9 元起

最近更新时间:2026.07.06 10:43:10