LogansUA / blizzard-api-php-client

PHP API client for Blizzard API
https://develop.battle.net/
MIT License
29 stars 13 forks source link

Unable to get user data #28

Open 95jonpet opened 7 years ago

95jonpet commented 7 years ago

I am trying to get user data, mainly the battletag for a single user through OAuth. I am, however, getting an error 403 from Guzzle.

My code is minimal:

$client = new BlizzardClient(config('blizzard.key'), config('blizzard.secret'), config('blizzard.region'), config('blizzard.locale'));

$auth = new CommunityOAuth($client);
$user = $auth->getUser();

return $user;

When using the tool at https://dev.battle.net/io-docs, an extra "authorization code" is needed to generate the access token, but I cannot find any reference to it here. The resulting link, here looks similar to the one provided by Blizzard, but it always results in the 403 error {"code":403, "type":"Forbidden", "detail":"Not Authorized"}.

LogansUA commented 7 years ago

@95jonpet Hi. Okay, I'll check it, as soon as i get to the computer

LogansUA commented 5 years ago

@95jonpet Hey, sorry for long response, I'm currently working on updating the library, once I'd finish this - the endpoint should work as well.