I am having a problem retrieving my AccessToken.
I can test my requests using my ClientID and ClientSecret with API examples from API reference site.
Using those examples I get sample URL that includes my AccessToken as a part of URL. I can create my solution with this AccessToken and with those example URLs.
Example URL in my solution to get character information:
“…/wow/character/”&pRealm&“/”&pCharName&“?fields=items&locale=en_GB&access_token=”&pAccessToken
I have included a request for AccessToken in my solution but that gives totally different AccessToken than using above method. I am using request as adviced in API Guides, using oauth.
This is my Python script:
import requests
data = {
‘grant_type’: ‘client_credentials’
}response = requests.post(‘…/oauth/token’, data=data, auth=(‘xxx’, ‘yyy’))
print(response.text)
This requests gives me totally different access token that testing site’s access token. Any advice?