尝试在 UnderArmour Connected Fitness api 中发布到access_token 端点时收到 403“开发者不活动”错误。正在使用的client_id处于活动状态。调用中使用的 url 为:https ://api.ua.com/v7.1/oauth2/access_token/
这是获取授权码后使用 python 调用的片段:
import requests
access_token_url = 'https://api.ua.com/v7.1/oauth2/access_token/'
access_token_data = {'grant_type': 'authorization_code',
'client_id': CLIENT_ID,
'client_secret': CLIENT_SECRET,
'code': authorize_code}
response = requests.post(url=access_token_url, data=access_token_data)
In [24]: response
Out[24]: <Response [403]>
In [25]: response.content
Out[25]: '<h1>Developer Inactive</h1>'
其中 CLIENT_ID 和 CLIENT_SECRET 是我在开发者门户上的注册值。