Giter Site home page Giter Site logo

qlaffont / fortnite-api Goto Github PK

View Code? Open in Web Editor NEW
346.0 38.0 85.0 2.7 MB

Fortnite API, Get Stats, News And Status

Home Page: https://twitter.com/qlaffont

License: MIT License

JavaScript 100.00%
fortnite api stats news status js fortnite-api epic-games

fortnite-api's People

Contributors

alcadesign avatar andrewchae avatar at0mzk1 avatar bahatron avatar codeeeee avatar darter-funny avatar dylanmcgee avatar fyris avatar gfauchart avatar ibabde avatar jericho1060 avatar koyamie avatar maverick0104 avatar qlaffont avatar robertograham avatar shaiarn avatar williamgalexander 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  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  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

fortnite-api's Issues

I can get the Launcher token, but Fortnite will not login with Fiddler open. Is there a fix?

When I open Fiddler 4, start fortnite will not connect to the server!
I can get the Launcher token!

how to slove it ??

  • Install & Open Fiddler 4
  • In Tools -> Options -> HTTPS, Select Capture HTTPS Connects
  • Start Capture
  • After that start your epic games launcher.
  • You will see a request with /account/api/oauth/token. Click on it and click after that on Inspectors get the header (Authorization header content and remove basic) => This header is your Client Launcher Token
  • Press F12 to stop scan (Fortnite stop working if you capture HTTPS requests at this moment)
  • Launch Fortnite
  • When the game tell you : "Connecting" or "Update" in waiting screen, Press F12 to reactivate requests capture
  • You will see again a request with /account/api/oauth/token. Click on it and click after that on Inspectors get the header (Authorization header content and remove basic) => This header is your Fortnite Client Token
  • Stop Capture

When the game tell you : "Connecting" or "Update" in waiting screen, Press F12 to reactivate requests capture

I tried it many times. It do not work!!!

Get the new replay list data

With the newest update Epic added replayed. I pretty sure the replays themself only can be viewed inside the client.

But the replays have som nice stats with them (win / kills and stuff)

login does not posses ther permissions READ

I followed all the instruction in the readme but i only get the message "Impossible to fetch user".
When i log the returned data i can get a errorCode/errorMessage and it states that my login does not posses the permission.

Am i doing something wrong or is there something else going on?

{ StatusCodeError: 403 - {"errorCode":"errors.com.epicgames.common.missing_permission","errorMessage":"Sorry your login does not posses the permissions 'fortnite:stats:b2fd2f667852444d94dd735d69f6666e READ' needed to perform the requested operation","messageVars":["fortnite:stats:b2fd2f667852444d94dd735d69f6666e","READ"],"numericErrorCode":1023,"originatingService":"fortnite","intent":"prod-live" }

API Rate Limit?

Do you know what the api limit is before Epic stops letting you query?

Error on PVE Stats route

curl -X POST \
  'https://fortnite-public-service-prod11.ol.epicgames.com/fortnite/api/game/v2/profile/{{accountId}}/public/QueryProfile?profileId=profile0&rvn=-1' \
  -H 'Authorization: Bearer f725da71467a4e29b190d8eefc547a0e' \

return

{
    "errorCode": "errors.com.epicgames.modules.profiles.operation_forbidden",
    "errorMessage": "Operation QueryProfile not allowed via this route",
    "messageVars": [
        "QueryProfile"
    ],
    "numericErrorCode": 12813,
    "originatingService": "fortnite",
    "intent": "prod-live"
}

Image library endpoint?

Is there an endpoint or way to get image assets of characters. As the api has ids for pickaxes (3b829757-254d-4011-99d3-a4ab770af629) but can't work out how to identify that id to an image.

Does not posses the action \'PLAY\'

While attempting to use the fortnite api for a school project I have encountered the error code:
{ 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: [Object],
numericErrorCode: 1023,
originatingService: 'fortnite',
intent: 'prod-live' } } }
Impossible to fetch User.
I can access the recent news and can confirm that my tokens and logins are correct but I cannot retrieve player data. I am using the .getStatsBR as seen in the documentation.
Any help would be appreciated!

new QueryProfile endpoint

It seems epic has changed the QueryProfile endpoint, anyone know what the new one is supposed to be? I do not have a computer right now to do scraping. My sites are not working.

🙂

Cant get my Launcher token

Everything is on and i followed the exact steps but there isnt any request to /account/api/oauth/token

Error processing

At this point, I caught the error associated with throttling. The error message is not obvious, it seems to me that we should return err.message

reject("Please enter good token");

Expose access tokens

I'm writing some code that interfaces with the Updates/Launcher part of the Epic system, I was wondering if you could just add a quick method that exposes the token that's retrieved on this line.

It gets replaced later on, so I can't just use .access_token

I can write a PR if you like, but I'm not sure how you would want this done (if at all.)

Tokens do not work.

Following the instructions, I got Fiddler 4, and got my two tokens from the header via opening the launcher and opening the game. I removed the word "basic" from the front, too. Yet, each time I try to run the code, I get this: "Uncaught (in promise) Please enter good token"

I believe this to be an issue in your code, but if I'm wrong, please help me correct this issue.

Thank you!

Challenges data

Does this api list ALL available endpoints? Is there currently any endpoint which holds Battlepass week data eg: Challenges by week.

LeaderBoards endpoint

login

Hi! Hi! After several tests of my API today, I have an error Please enter a good token. While searching on the EPIC GAMES side, it returns the error to me errors.com.epicgames.account.oauth.too_many_sessions. Would it be possible, in order to authenticate and use the EPIC GAMES API, to just provide the login and password to your module, which will take care of the necessary tokens for the continuation?
Because as a result, I am currently unable to connect to epic games, and my application is also unavoidable.


Hello! Après plusieurs tests de mon API aujourd'hui, j'ai une erreur Please enter a good token. En cherchant côté EPIC GAMES, il me retourne l'erreurerrors.com.epicgames.account.oauth.too_many_sessions. Serait-il possible, pour s'authentifier et utiliser l'API EPIC GAMES, de fournir juste le login et password à ton module, qui s'occuperai des tokens nécessaires pour la suite ?
Car de ce fait, je me retrouve à l'heure actuelle dans l'incapacité de me connecter à epic games, et mon appli aussi

SkYNewZ/rest-fornite-api#13

KillSession not working?

Hello,

When I try to kill the session, it succeeds but the program is still running on the command line. Here is my code:

fortniteAPI.login().then(()
 => {
  fortniteAPI
    .getFortniteNews("en")
    .then(news => {
      console.log(news.br);
      fortniteAPI.killSession()
        .then(() => {
          console.log("killed");
        }).catch(err => {
          console.log(err);
        });
    })
    .catch(err => {
      console.log(err);
    });
});

I also tried it with the .killSession() method outside of the login(), but still to no success. Thanks in advance!

getStatsPVE no longer working?

I was trying to debug why calls to getStatsPVE weren't working and when I make the request, here is the response I get:

{  
   "errorCode":"errors.com.epicgames.modules.profiles.operation_forbidden",
   "errorMessage":"Operation QueryProfile not allowed via this route",
   "messageVars":[  
      "QueryProfile"
   ],
   "numericErrorCode":12813,
   "originatingService":"fortnite",
   "intent":"prod-live"
}

Is this method no longer working, or is there a different reason I am getting this message?

Hi Qlaffont, can you check for me whether my params is ok?

// require the package
const Fortnite = require("fortnite-api");

let fortniteAPI = new Fortnite(
[
"[email protected]",
"mypassword",
"eg1eyJraWQiOiJ0RkMyVUloRnBUTV9FYTNxY09kX01xUVQxY0JCbTlrRkxTRGZlSmhzUkc4IiwiYWxnIjoiUFMyNTYifQ.eyJhcHAiOiJsYXVuY2hlciIsInN1YiI6ImU2ZGQ2ZGU0ZmE3ZTQzNWE5NDUxMmVkYTdmNzUwMjM1IiwicnNpZCI6IjhlMmJkYjM3ZDZjNzRkNGM4NzllMjc4NjRiMDZkNDYyIiwiY2xpZCI6IjM0YTAyY2Y4ZjQ0MTRlMjliMTU5MjE4NzZkYTM2ZjlhIiwiYW0iOiJleGNoYW5nZV9jb2RlIiwic3NpZCI6ImZlMzg2Nzg1NTk4NTQ3OTdiZGY0YzRmMjY2MmQ3MWE5IiwicCI6ImVOcWxWVTF2R2pFUVwvVCtJUTBrZ3RKWTRSRkhTSHFLbUtxMTZqQVo3bHJYdz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sImljIjp0cnVlLCJleHAiOjE1MjcxNjAzNzcsImFtIjoiY2xpZW50X2NyZWRlbnRpYWxzIiwiaWF0IjoxNTI3MTQ1OTc3LCJzc2lkIjoiZDUxODQ3NmE1YzVlNDkzZThkYTUyNmEwYTQ5MTY1ZGYiLCJqdGkiOiJkNTE4NDc2YTVjNWU0OTNlOGRhNTI2YTBhNDkxNjVkZiJ9.AJTyPphPtgtoCAjcIJyJBSao-PvMdDRzXokwd-yKWfSwMkaa1lTNRiZCRixyGvGPeSebx7lZYoipvvYhTB27N-yH"
],
{
debug: true
}
);

fortniteAPI.login().then(() => {
fortniteAPI
.checkPlayer("Mirardes", "pc")
.then(stats => {
console.log(stats);
})
.catch(err => {
console.log(err);
});
});

I got a error message "UnhandledPromiseRejectionWarning: Please enter good token"
"UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). (rejection id: 1)"

"DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promise rejections that are not handled will terminate the Node.js process with a non-zero exit code"

Looking forward to your reply.

API Question

Do I need to run the application to access the API or are the tokens enough?
I'm looking to host an API on a Linux container and that's probably impossible if I need to run both the client and the game to make API requests.

Stats only for current season

Using this API we can get user's lifetime stats, but is it possible to get stats for specific seasons or at least current season like in FortniteTracker and StormShield websites?

How can i get tokens?

I really didn't understand about how can i get tokens,

I'm stick on Epic game launcher step..

I launch it then i did go to fiddler, and trying to find /account/api/oauth/token request and i didn't found it!

please help me at this step..

Unhandled promise rejections

When my token is too used (when consecutively testing for example), I obtain this error but the process don't exit...
Can you test the valid access token before start using this ? https://github.com/qlaffont/fortnite-api/blob/master/index.js#L51

(node:17) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). (rejection id: 1)
(node:17) [DEP0018] DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promise rejections that are not handled will terminate the Node.js process with a non-zero exit code.```

Passing in usernames with spaces?

Having some issues with users that have Epic Games usernames that contain spaces. I can send in the name of the user with the space, but it always returns user not found. Not sure if I'm doing something wrong or if the API isn't capable of handling spaces in usernames.

Challenges data

Is it possible to get a users challenges data? Happy to contribute if we can.

Impossible de rechercher plusieurs utilisateurs à la fois ?

Bonjour, j'aimerais savoir si il y a une possibilité de rechercher plusieurs personnes simultanément à l'aide des pseudos utilisateurs ou des identifiants ?

Par exemple pour récupérer 500 utilisateurs à la fois en une seule requête, sans être obliger de les rechercher un par un.

PS : Au bout d'une centaine le serveur nous retourne une erreur "UnhandledPromiseRejectionWarning: Unhandled promise rejection (rejection id: 92): Please enter good token"

Cordialement, Valor

License?

Hi, I noticed there is no LICENSE file for this project. What is the license, MIT? I was wanting to replicate this API in Go and wanted to check if I am allowed to base my work off of this.

Thanks. :)

No 2nd oauth token

There is no second /account/api/oauth/token request if I capture the traffic at the update or login screen....

about pve api

is there a way to get user information from pve user and also why pve api is deprecated ?
thank you

Windowed BR Stats

I noticed here:

    statsBR: accountId => {
        return (
            "https://fortnite-public-service-prod11.ol.epicgames.com/fortnite/api/stats/accountId/" +
            accountId +
            "/bulk/window/alltime"
        );
    }

the window key word found in the API endpoint.

Any known alternatives to this other than alltime?

I'm searching for ways of gathering placements for matches played within a window of time for a set of players.

If a kill session method is usefull ?

I found the kill session endpoints, maybe it can be usefull:

curl -X DELETE \
  'https://account-public-service-prod03.ol.epicgames.com/account/api/oauth/sessions/kill/{{ACCESS_TOKEN}}' \
  -H 'Authorization: Bearer {{ACCESS_TOKEN}}'

It can be usefull for kill the current session at the end of testing to prevent error "too many session"

Incorrect token type

Hi again,

I was working on an endpoint for leaderboards and noticed that I needed JWT token with permissions inside in order to make those requests... I began looking through Fiddler and saw that the token request (token_type) type must be "eg1" in order for us to get this seemingly-JWT looking token back. I wonder if the request here is wrong and not "egl"?

We get back a basic access token there, but if you request "eg1" as in the number 1, not the letter L, you get a JWT token back instead. This token is needed for other permissive requests, such as requesting data from the new leaderboard APIs.

Was curious if you had any additional information on this, or if it is a typo?

The initial request to /account/api/oauth/token is an encoded body which reads:
grant_type=client_credentials&token_type=eg1

Unable to retrieve Fortnite Client token

I'm following the instructions on the readme, I've already successfully gotten my client launcher token, but I can't seem to get the Fortnite client token. Maybe I'm not understanding the instructions correctly, but here's what I've been doing now:

  1. Disable capturing (otherwise it kicks you out of your account and you're unable to login)
  2. Start up Fortnite.
  3. Go to "battle royale"
  4. Start capturing
  5. Search for a match.

This doesn't lead to anything, neither does capturing before searching a match, as it just kicks me out of my account. (Also, where is it supposed to say "Connecting" or "Update"?)

Request package

Not sure if this is an local issue or in the package but:

I installed this npm package but when i run it it gives the error:

The "request" library is not installed automatically anymore. install it with....

Even when i install that package and the request-promise as well i keep getting the error. Anyone has any idea?

Node version: v8.9.4

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.