NicklasWallgren / PokemonGoAPI-PHP

Pokemon Go API PHP library
BSD 2-Clause "Simplified" License
130 stars 51 forks source link

403 Forbidden #181

Open zoltantajti opened 3 years ago

zoltantajti commented 3 years ago

hey.

I can starting using this api, and all time i get the [reasonPhrase:GuzzleHttp\Psr7\Response:private] => Forbidden [statusCode:GuzzleHttp\Psr7\Response:private] => 403 error.

How I can fix?

`<?php require DIR . '/vendor/autoload.php';

use NicklasW\PkmGoApi\Authentication\AccessToken; use NicklasW\PkmGoApi\Authentication\Config\Config; use NicklasW\PkmGoApi\Authentication\Factory\Factory; use NicklasW\PkmGoApi\Kernels\ApplicationKernel;

$config = new Config(); $config->setProvider(Factory::PROVIDER_GOOGLE); $config->setUser(''); $config->setPassword('');

$manager = Factory::create($config);

$application = new ApplicationKernel($manager); $pokemonGoApi = $application->getPokemonGoApi(); $inventory = $pokemonGoApi->getInventory(); $playerStats = $inventory->getStats();

?>`

Thank you.