我正在尝试获取 OAuth 令牌来获得对某些 FedEx API 的授权访问权限(例如用于跟踪货件的 Track API),但我得到了401 (NOT.AUTHORIZED.ERROR -> "The given client credentials were not valid. Please modify your request and try again") error.
(目前,我正在使用 Postman 来尝试测试 API。)
这是我正在使用的网址,由 FedEx 提供:https://apis-sandbox.fedex.com/oauth/token
我遵循(根据我的理解)应如何设置正文和标题:
Headers: Content-Type: application/x-www-form-urlencoded
Body: x-www-form-urlencoded (Postman option):
grant_type: client_crendentials
client_id: ***PROJECT_API_KEY
client_secret: ***PROJECT_SECRET KEY
发送后,我只收到上面的错误消息。我检查/仔细检查了我的 API 密钥,但我似乎无法让它通过。
有任何想法吗?
postman settings:
POST - URL https://apis-sandbox.fedex.com/oauth/token
Headers - Content-Type: application/x-www-form-urlencoded
Body - x-www-form-urlencoded:
grant_type: client_credentials
client_id: *******
client_secret: *******
(信息来自https://developer.fedex.com/api/en-us/catalog/authorization/v1/docs.html https://developer.fedex.com/api/en-us/catalog/authorization/v1/docs.html)
创建新帐户时,沙箱 API 凭据无法立即使用。花了>1小时让我从联邦快递收到一封注册完成的电子邮件,之后沙箱凭证变得有效。
本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系:hwhale#tublm.com(使用前将#替换为@)