blizzard-api-php-client icon indicating copy to clipboard operation
blizzard-api-php-client copied to clipboard

Unable to get user data

Open 95jonpet opened this issue 8 years ago • 2 comments

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"}.

95jonpet avatar Jun 30 '17 21:06 95jonpet

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

LogansUA avatar Jul 01 '17 11:07 LogansUA

@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.

LogansUA avatar Jan 25 '19 09:01 LogansUA