Fortnite API JavaScript Get Stats, News, Status

A simple to use module for interacting with Fortnite API. Inspiration from Jake-Ruston and Xilixir packages.

Support  us by sharing our post.

Install

API

INIT

To setup this module, you need to have an account on Epic Games. After that you need to get 2 dedicated headers from Fortnite.

How to get these headers ?

Install & Open Fiddler 4

To setup this module, you need to have an account on Epic Games. After that you need to get 2 dedicated headers from Fortnite.

How to get these headers ?

  • Install & Open Fiddler 4
  • In Tools -> Options -> HTTPS, Select Capture HTTPS Connects
  • 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
  • Launch Fortnite
  • 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

SETUP

METHODS

checkPlayer() : Promise with String Return
Check if player is found on this platform

getStatsBR(username: String, platform: String) : Promise with Object Return
Get Battle Royal Stat for platform (pc, ps4, xb1);

getStatsBRFromID(idFortniteUser: String, platform: String) : Promise with Object Return
Get Battle Royal Stat for platform (pc, ps4, xb1);

 

getStatsPVE(username: String) : Promise with Object Return
Get PVE Stat ;

 

getFortniteNews(lang) : Promise with Object Return
Get Fortnite News on ‘en’ or ‘fr’

 

getFortnitePVEInfo(lang) : Promise with Array Return
Get Fortnite PVE Info (storm, etc) lang => FR/EN

getStore(lang) : Promise with Array Return
Get Fortnite Store lang => FR/EN


 

You may also like...