Skip to content
This repository has been archived by the owner on Dec 28, 2018. It is now read-only.

Latest commit

 

History

History
79 lines (57 loc) · 3.18 KB

README.md

File metadata and controls

79 lines (57 loc) · 3.18 KB

Fortnite-API on NodeJs Server

Build Status codecov Docker Pulls code style: prettier Donate

Example

You can found SwaggerUI here https://skynewz-api-fortnite.herokuapp.com/api-docs

Authentification JWT

⚠️ This API is now with JWT authentification. Send me an e-mail to obtain a login and password in order to use this with a valid token ⚠️ For all the /api routes, you need to set the Authorization; Bearer <token> header.

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
  • 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

Start with docker 🐳

You can use this docker-compose.yml replacing environements variables values by yours. in order to startup this API. Just download this file and docker-compose up

Start with nodejs

Requirements

  • Nodejs >= 8.9
  • Rename .env.example to .env and set your values for the environements variables :
LOGIN_EMAIL=Your epic games account
LOGIN_PASSWORD=Your epic games password
OAUTH_EPIC_LAUNCHER=See init part
OAUTH_FORTNITE=See init part
DATABSE_CONNECTION_STING=postgres://user:password@host:port/database

Start in developement mode

$ git clone https://github.com/SkYNewZ/rest-fornite-api
$ cd rest-fornite-api
# Run
$ npm run dev

Start in production mode

$ git clone https://github.com/SkYNewZ/rest-fornite-api
$ cd rest-fornite-api
# build the TypeScript
$ npm run build
# Run
$ npm start

Endpoint

Supported plateform : pc, ps4, xb1. You can view endpoints at https://skynewz-api-fortnite.herokuapp.com/api-docs/

Just for fun

Skynewz Stats