Developer Inactive error when calling the UnderArmour api function

Error 403 "Developer is inactive" was received while trying to send an access_token endpoint message in the UnderArmour Connected Fitness api application. Used by client_id . URL used in the call: https://api.ua.com/v7.1/oauth2/access_token/

This is a snippet of a call using python after receiving the authorization code:

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>'

where CLIENT_ID and CLIENT_SECRET are my registered values ​​on the developer portal.

+4
source share
1 answer

, api.ua.com, "api-key", 403 Developer Inactive.

, , 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}

headers = {'api-key': CLIENT_ID}

response = requests.post(url=access_token_url, data=access_token_data, headers=headers)

In [30]: response
Out[30]: <Response [200]>

In [31]: response.content
Out[31]: '{"user_id": "<user_id>", "access_token": "<access token>", "expires_in": 2591999, "token_type": "Bearer", "scope": "read", "user_href": "/v7.1/user/<user id>/", "refresh_token": "<refresh token>"}'
+3

All Articles