4
尝试发布UnderArmour Connected Fitness API中的access_token endpoint时收到403“开发人员无效”错误。正在使用的client_id处于活动状态。在调用中使用的网址是:https://api.ua.com/v7.1/oauth2/access_token/开发人员在调用UnderArmour api时发生无效错误
这是使用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是对开发商的门户网站我的注册值。