Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Getting 403 Forbidden #164

Closed
ghost opened this issue Feb 7, 2021 · 4 comments
Closed

Getting 403 Forbidden #164

ghost opened this issue Feb 7, 2021 · 4 comments
Labels

Comments

@ghost
Copy link

ghost commented Feb 7, 2021

So I've been using the API for a while and all of a sudden I started getting the 403 about a week ago. So I tried re-authenticating with a new npsso token. No dice. I waited a few hours tried again, same thing. Then I waited about 2 days and I still get the same error.

The error I get is:

PHP Fatal error: Uncaught GuzzleHttp\Exception\ClientException: Client error: `POST https://auth.api.sonyentertainmentnetwork.com/2.0/oauth/token` resulted in a `403 Forbidden` response: Access Denied

Any ideas what is wrong?

Here is my authentication code:

require_once '/directory/vendor/autoload.php';

use PlayStation\Client;

$client = new Client();
//                           v code from above
$client->loginWithNpsso('<npsso code>');

$refreshToken = $client->refreshToken();
@Strategeru
Copy link

403 means your IP is banned for API Requests / Akamai.

@ghost
Copy link
Author

ghost commented Feb 8, 2021

Is there anyway to get around it? I wasn't even requesting all that much to my knowledge. The ban doesn't lift after some period of time? Furthermore, I thought if you hit too many requests they just hit you with a 429 and you had to wait. I haven't seen anyone else on here talk about a permanent ban.

@Strategeru
Copy link

Strategeru commented Feb 9, 2021

Only way I know – use different IP. Usually such bans lifted after few hours, but some time it can stay active for a week or so. They have 2 limits on API, one on API side, with will give you 429 errors, second on server/ Akamai side, it will ether give you 403 error or connection timeout without any error.

You can check for more details on Akamai IP ban here: issue #82, issue #119 and FriendsOfGalaxy/galaxy-integration-psn#7

@stale
Copy link

stale bot commented Apr 16, 2021

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

@stale stale bot added the wontfix label Apr 16, 2021
@stale stale bot closed this as completed Apr 24, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant