Giter VIP home page Giter VIP logo

fortnite-php's Introduction

fortnite-php's People

Contributors

atgrau avatar bahatron avatar bulgarianhealer avatar ermos avatar fyris avatar tustin avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

fortnite-php's Issues

Error while refreshing token

Hello, whenver I run my php function to refresh my current player data by using the refresh function from Auth I get this error.

PHP Notice:  Undefined property: stdClass::$access_token in /var/www/third_party/fortnite-api/vendor/tustin/fortnite-php/src/Auth.php on line 121
PHP Fatal error:  Uncaught Exception: Unable to unpack offline token: Invalid serialized unsecured/JWS/JWE object: Missing second delimiter in /var/www/third_party/fortnite-api/vendor/tustin/fortnite-php/src/Auth.php:122
Stack trace:
#0 /home/cron/fortnite.php(14): Fortnite\Auth::refresh('eg1~eyJraWQiOiJ...')
#1 {main}
  thrown in /var/www/third_party/fortnite-api/vendor/tustin/fortnite-php/src/Auth.php on line 122

I don't know what the error could be since I'm using the token 30sec right after I get the token.

Problem with Stats.php

PHP Parse error: syntax error, unexpected 'array' (T_ARRAY), expecting ';' or '{' in /var/www/fortniteleaderboards.org/vendor/tustin/fortnite-php/src/Stats.php on line 98

Error while login in

Fatal error: Uncaught exception 'GuzzleHttp\Exception\ClientException' with message 'Client error: `POST https://fortnite-public-service-prod11.ol.epicgames.com/fortnite/api/game/v2/profile/893913b952a44596ab99414dc183cf2a/client/QueryProfile?profileId=athena&rvn=-1` resulted in a `403 Forbidden` response: {"errorCode":"errors.com.epicgames.common.missing_action","errorMessage":"Login is banned or does not posses the action (truncated...) ' in /home/xpolishp/public_html/addon/xpolish.pl/discordbot/vendor/guzzlehttp/guzzle/src/Exception/RequestException.php:113 Stack trace: #0 /home/xpolishp/public_html/addon/xpolish.pl/discordbot/vendor/guzzlehttp/guzzle/src/Middleware.php(66): GuzzleHttp\Exception\RequestException::create(Object(GuzzleHttp\Psr7\Request), Object(GuzzleHttp\Psr7\Response)) #1 /home/xpolishp/public_html/addon/xpolish.pl/discordbot/vendor/guzzlehttp/promises/src/Promise.php(203): GuzzleHttp\Middleware::GuzzleHttp\{closure}(Object(GuzzleHttp\Psr7\Response)) #2 /home/xpolishp/public_html/addon/xpolish.pl/disc in /home/xpolishp/public_html/addon/xpolish.pl/discordbot/vendor/guzzlehttp/guzzle/src/Exception/RequestException.php on line 113

Status

Fortnite server status class needs implementing.

Specific Player Stats Error

Hello, a user using my website reported for an issue with his account, i tried to get data using his name and his id but i get this error "Invalid argument supplied for foreach()",
He is a ps4 user and changed his name on epic and ps4 newly after the change he started getting this error.

Can't get leaderboards

Fatal error: Uncaught GuzzleHttp\Exception\ServerException: Server error: 'POST https://fortnite-public-service-prod11.ol.epicgames.com/fortnite/api/leaderboards/type/global/stat/br_placetop1_pc_m0_p10/window/weekly?ownertype=1&itemsPerPage=50 resulted in a 500 Internal Server Error' response: {"errorCode":"errors.com.epicgames.common.server_error","errorMessage":"Sorry an error occurred and we were unable to re (truncated...) in C:\xampp\htdocs\fortnite\vendor\guzzlehttp\guzzle\src\Exception\RequestException.php:113 Stack trace: #0 C:\xampp\htdocs\fortnite\vendor\guzzlehttp\guzzle\src\Middleware.php(66): GuzzleHttp\Exception\RequestException::create(Object(GuzzleHttp\Psr7\Request), Object(GuzzleHttp\Psr7\Response)) #1 C:\xampp\htdocs\fortnite\vendor\guzzlehttp\promises\src\Promise.php(203): GuzzleHttp\Middleware::GuzzleHttp\{closure}(Object(GuzzleHttp\Psr7\Response)) #2 C:\xampp\htdocs\fortnite\vendor\guzzlehttp\promises\src\Promise.php(156): GuzzleHttp\Promise\Promise::callHandler(1, Object(GuzzleHttp\Psr7\Response), in C:\xampp\htdocs\fortnite\vendor\guzzlehttp\guzzle\src\Exception\RequestException.php on line 113

unauthorized_client

{#448 โ–ผ
+"errorCode": "errors.com.epicgames.common.oauth.unauthorized_client"
+"errorMessage": "Sorry your client is not allowed to use the grant type password"
+"messageVars": []
+"numericErrorCode": 1015
+"originatingService": "com.epicgames.account.public"
+"intent": "prod"
+"error_description": "Sorry your client is not allowed to use the grant type password"
+"error": "unauthorized_client"
}

Did they change anything recently? It was working yesterday

Exception

Fatal error: Uncaught GuzzleHttp\Exception\ClientException: Client error: POST https://fortnite-public-service-prod11.ol.epicgames.com/fortnite/api/game/v2/profile/62d343e3caea47e881e8919e31b8f1ac/client/QueryProfile?profileId=athena&rvn=-1 resulted in a 403 Forbidden response: {"errorCode":"errors.com.epicgames.common.missing_action","errorMessage":"Login is banned or does not posses the action (truncated...) in E:\Programmi\XAMPP\htdocs\provaTinti\vendor\guzzlehttp\guzzle\src\Exception\RequestException.php:113 Stack trace: #0 E:\Programmi\XAMPP\htdocs\provaTinti\vendor\guzzlehttp\guzzle\src\Middleware.php(66): GuzzleHttp\Exception\RequestException::create(Object(GuzzleHttp\Psr7\Request), Object(GuzzleHttp\Psr7\Response)) #1 E:\Programmi\XAMPP\htdocs\provaTinti\vendor\guzzlehttp\promises\src\Promise.php(203): GuzzleHttp\Middleware::GuzzleHttp{closure}(Object(GuzzleHttp\Psr7\Response)) #2 E:\Programmi\XAMPP\htdocs\provaTinti\vendor\guzzlehttp\promises\src\Promise.php(156): GuzzleHttp\Promise\Promise::callHandler(1, in E:\Programmi\XAMPP\htdocs\provaTinti\vendor\guzzlehttp\guzzle\src\Exception\RequestException.php on line 113

Update version number

Hello,

The latest commit on master fixes an issue with "Division by zero" but the commit is not tagged as a release so i can't download the fixed version through composer

Cannot fetch leaderboards

Calling $auth->leaderboard->find(platform, mode) throws the following error:

"Undefined property: Fortnite\Leaderboard::$account" at:

 $accounts = $this->account->getDisplayNamesFromID($ids);

Uncaught Error: Class 'Language' not found

Hello I have some problems with latest version.
Get leadeboards is not working because:
Uncaught Error: Class 'Platform' not found
news and store not working because
Uncaught Error: Class 'Language' not found
Full error:

FastCGI sent in stderr: "PHP message: PHP Fatal error: Uncaught Error: Class 'Language' not found in /domain/file.php:5
Stack trace:
#0 {main}
thrown in /domain/file.php on line 5" while reading response header from upstream

My code:

<?php
require_once 'vendor/autoload.php';
use Fortnite\Auth;
$auth = Auth::login('[email protected]','x');
var_dump($auth->store->getStore(Language::ENGLISH));

Error Login

Help I get this error:

Fatal error: Uncaught GuzzleHttp\Exception\ClientException: Client error: POST https://fortnite-public-service-prod11.ol.epicgames.com/fortnite/api/game/v2/profile/848a9343e9124aed8b188677ddc40278/client/QueryProfile?profileId=athena&rvn=-1 resulted in a 403 Forbidden response: {"errorCode":"errors.com.epicgames.common.missing_action","errorMessage":"Login is banned or does not posses the action (truncated...) in .....

Warning on news

Hi, I'm not sure if this is an issue, but I got problems getting constants SAVETHEWORLD and BATTLEROYALE of news module.

<br /> <b>Warning</b>: Use of undefined constant SAVETHEWORLD - assumed 'SAVETHEWORLD'

Maybe adding Self before constants:

35        if ($type != Self::SAVETHEWORLD && $type != Self::BATTLEROYALE)
36            throw new \Exception("Only SaveTheWorld and BattleRoyale news are currently supported");

Solves the problem. #33

Can we get STW information ?

Hey! Great stuff, the Uri is what I've been looking for . . . lol and you have it. My question or issue is getting STW information - (stormshield one) style.

Can your wrapper do that ?

Battle Pass Challenges

I just pushed a new commit to support challenges but I wasn't able to test them with the battle pass challenges as I don't own the battle pass. If someone who has it could test out the challenges and make sure they work, that would be great! Just post a reply stating if it works or not. Mostly just want to make sure you don't run into any parse errors with the Challenges class and also that getWeekly() and getWeeklys() work fine.

Thanks!

problem with fortniteleaderboardData

I am now using php 7 but am getting this error? Any ideas?

PHP Warning: Division by zero in /var/www/fortnitetest/vendor/tustin/fortnite-php/src/Model/FortniteStats.php on line 72
PHP Fatal error: Uncaught Error: Call to undefined method Fortnite\Leaderboard::getLeaderboardData() in /var/www/fortnitetest/basic2.php:18
Stack trace:
#0 {main}
thrown in /var/www/fortnitetest/basic2.php on line 18

400 Bad Request` response

HI, there's an error. Pls can u help me.

Fatal error: Uncaught GuzzleHttp\Exception\ClientException: Client error: POST https://account-public-service-prod03.ol.epicgames.com/account/api/oauth/token resulted in a 400 Bad Request response: { "errorCode" : "errors.com.epicgames.account.invalid_account_credentials", "errorMessage" : "Sorry the account cred (truncated...) in /Users/migueld/projects/php/fortnite_api/vendor/guzzlehttp/guzzle/src/Exception/RequestException.php:113 Stack trace: #0 /Users/migueld/projects/php/fortnite_api/vendor/guzzlehttp/guzzle/src/Middleware.php(66): GuzzleHttp\Exception\RequestException::create(Object(GuzzleHttp\Psr7\Request), Object(GuzzleHttp\Psr7\Response)) #1 /Users/migueld/projects/php/fortnite_api/vendor/guzzlehttp/promises/src/Promise.php(203): GuzzleHttp\Middleware::GuzzleHttp{closure}(Object(GuzzleHttp\Psr7\Response)) #2 /Users/migueld/projects/php/fortnite_api/vendor/guzzlehttp/promises/src/Promise.php(156): GuzzleHttp\Promise\Promise::callHandler(1, Object(GuzzleHttp\Psr7\Response), Array) #3 /Users/migueld/proje in /Users/migueld/projects/php/fortnite_api/vendor/guzzlehttp/guzzle/src/Exception/RequestException.php on line 113

I also used your fortnitetracker app.
and I have this error
(1/1) ClientException
Client error: POST https://account-public-service-prod03.ol.epicgames.com/account/api/oauth/token resulted in a 400 Bad Request response:
{
"errorCode" : "errors.com.epicgames.account.invalid_account_credentials",
"errorMessage" : "Sorry the account cred (truncated...)

SSL certificate problem

Not Sure if the contribution message is related.

However, I am getting the following error when trying to run the test php file in cmd (Windows)

PHP Fatal error: Uncaught GuzzleHttp\Exception\RequestException: cURL error 60: SSL certificate problem: unable to get local issuer certificate (see http://curl.haxx.se/libcurl/c/libcurl-errors.html)

Any ideas on how to resolve this issue in order to use this wrapper?

Thanks

No kill_death_ratio

[kill_death_ratio] => 0
Is always set to 0.
[kill_death_per_game] => 4.51
But we have kill_death_per_games

Make search profil

hello, is there a possibility to search the profile of a friend to see his stats ????

User not found

hi, i still use this api with php and get this error when search someone users.
Fatal error: Uncaught exception 'Fortnite\Exception\UserNotFoundException' with message 'User NAMEPLAYER was not found.' in /web/htdocs/src/vendor/tustin/fortnite-php/src/Stats.php:79 Stack trace: #0 /web/htdocs/test.php(14): Fortnite\Stats->lookup('NamePlayer') #1 {main} thrown in /web/htdocs/src/vendor/tustin/fortnite-php/src/Stats.php on line 79
i get this error only with this api, if i use a web fortnite tracker finded on google, it' works.

Specific Season stats

Cant i get the stats for a specific season, not alltime?

i tried to change in stats.php from bulk/window/alltime to season4 or season5 it doesn't work :/

how fortnitetracker and fortnite api gets the stats of each season ?

last modified

Hello

Is there any reason why you're ignoring the 'lastmodified' attribute from the raw stats?. That number would greatly reduce the amount of validation i'd need to do for storing historical statistics

2FA

2FA needs fixing (never got the original working) and needs to be supported in the rewrite.

Store to json (help)

hello, how can i encode the store result to json? im tryint to make an app and i need json to parse it!

403 error

Anyone meet this like me? Don't know why and need help.
Thanks a lot.
403
{"errorCode":"errors.com.epicgames.common.missing_action","errorMessage":"Login is banned or does not posses the action 'PLAY' needed to perform the requested operation for platform ''","messageVars":["PLAY",""],"numericErrorCode":1023,"originatingService":"fortnite","intent":"prod-livecn"}

PS4 Account error

Hello, I found a problem, I have 4 account on fortnite for testing with data (xbox one, ps4 ,switch and PC).
When i try to connect on my PS4 account with the
$auth = Auth::login('[email protected]','password');
that not work and when I try with the PC account or Xbox One that work.
Someone can help me please ?
Thank

2-Factor Authentication

When I try to login, I receive the following error message:

Two-Factor authentication required to process request.

Is there any way to support 2-factor authentication?

Decode offerId?

Know anyone how to convert or decode the offerId for items at the store.

EX:

offerId: 11fb033c9cf9e251b35b7487cdea9357135054de607c011913609b06eae7d8d9 (I get this string direct from Epic Games API).

TO:

Item ID (api): d633710-bf33be9-4821704-8e006cf

Many thanks! :)

Fatal error: Uncaught Error: Class 'GuzzleHttp\Client' not found

Hello, i have little problem

erreur

Fatal error: Uncaught Error: Class 'GuzzleHttp\Client' not found in /home/xxxxxx/api/xxxxxx/libs/Fortnite/FortniteClient.php:67 

Stack trace: #0 /home/xxxxxx/api/xxxxxx/libs/Fortnite/Auth.php(48)

Fortnite\FortniteClient::sendUnrealClientPostRequest('https://account...', Array) #1 /home/xxxxxx/api/xxxxxx/index.php(7): 

Fortnite\Auth::login('xxxxxx@xxxxxx', 'xxxxxx')

 #2 {main} thrown in /home/xxxxxx/api/xxxxxx/libs/Fortnite/FortniteClient.php on line 67

code

<?php

require_once 'libs/Fortnite/auto_loader.php';

use Fortnite\Auth;

$auth = Auth::login('xxx','xxx);
var_dump($auth->profile->stats);

?>

in auto_loader.php

require_once('Exception/InvalidGameModeException.php');
require_once('Exception/InvalidStatException.php');
require_once('Exception/StatsNotFoundException.php');
require_once('Exception/UserNotFoundException.php');
require_once('Model/FortniteStats.php');
require_once('Model/Items.php');
require_once('Auth.php');
require_once('Stats.php');
require_once('Platform.php');
require_once('Profile.php');
require_once('FortniteClient.php');

If you know how to solve my problem, in any case very pretty work ๐Ÿ˜„

2 Factor Auththentication Issues

Hello i know you have addressed this , can you tell me when it will be available via composer?

I need all data for accounts with and without 2 factor if possible

thanks in advance.

K/D ratio cleanup!

Hello Tustin, Here is a cleanup for the K/D ratio in

FortniteStats.php

$this->kill_death_ratio = ($this->matches_played - $this->wins === 0) ? 0 : round(@($this->kills) / ($this->matches_played - $this->wins), 2);

Player Stats

Hi, when player stats are fetched I think that something is not working properly, for example, the top 3, 5, 6, 12 and maybe more, always are 0.

Someone noticed about this?
Thanks

Can't login, RuntimeException GuzzleHttp

Fatal error: Uncaught exception 'RuntimeException' with message 'GuzzleHttp requires cURL, the allow_url_fopen ini setting, or a custom HTTP handler.' in /users/tusta/www/EpicRoyale/vendor/guzzlehttp/guzzle/src/functions.php:119 Stack trace: #0 /users/tusta/www/EpicRoyale/vendor/guzzlehttp/guzzle/src/HandlerStack.php(40): GuzzleHttp\choose_handler() #1 /users/tusta/www/EpicRoyale/vendor/guzzlehttp/guzzle/src/Client.php(65): GuzzleHttp\HandlerStack::create() #2 /users/tusta/www/EpicRoyale/vendor/tustin/fortnite-php/src/FortniteClient.php(74): GuzzleHttp\Client->__construct() #3 /users/tusta/www/EpicRoyale/vendor/tustin/fortnite-php/src/Auth.php(55): Fortnite\FortniteClient::sendUnrealClientPostRequest('https://account...', Array) #4 /users/tusta/www/EpicRoyale/index.php(34): Fortnite\Auth::login('', '') #5 {main} thrown in /users/tusta/www/EpicRoyale/vendor/guzzlehttp/guzzle/src/functions.php on line 119

Match Stats

Hello,

Just wanted to start off by saying awesome work here. Is anyone aware of a match stats endpoint? Something that provides maybe damage done, damage taken, etc..

  • Thank You

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.