从UPS API获取授权码出错,求需调整的配置方案
UPS OAuth授权码获取失败求助
我们正在调用UPS的OAuth授权端点获取授权码,使用的API地址是:https://wwwcie.ups.com/security/v1/oauth/authorize
请求携带的必填查询参数如下:
client_id:xxxxxxxxxxxxxxxxxxxxxxxxxxxxredirect_uri:https://example.io/response_type:code
我们已经尝试添加或移除以下两个可选参数:
state:upsscope:试过shipping、rating、tracking、ship等多个不同值
但始终收到如下错误:
Could not get any response
Failed to fetchWhy 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
相关产品推荐
相关产品推荐

