Code Monkey home page Code Monkey logo

fortniteendpoints's Introduction

Fortnite API

A simple to use package for interacting with Fortnite API.

Install

$ go get github.com/jryd/fortnite

API

FIRST THINGS FIRST

To access the Fortnite API, you need to have an account on Epic Games. After that you need to get 2 headers that your client uses to access Fortnite.

You can get these headers by using a tool to capture incoming and outgoing HTTP traffic. The steps below are for the Fiddler tool that I used.

  • Install & Open Fiddler
  • In Tools -> Options -> HTTPS, Select Capture HTTPS Connects
  • After that start the Epic Games launcher
  • You will see a request with /account/api/oauth/token. Click on it -> Click Inspectors to view the headers (you want to grab the long string in the Authorization header, without the basic part - i.e header is basic abcd... you only need the abcd... bit) => This header is your Client Launcher Token
  • Launch Fortnite
  • You will see again a request with /account/api/oauth/token. Click on it -> Click Inspectors to view the headers (you want to grab the long string in the Authorization header, without the basic part - i.e header is basic abcd... you only need the abcd... bit) => This header is your Fortnite Client Token

USAGE

fortniteClient := fortnite.NewClient("email address", "password", "client launcher token", "fortnite client token")

METHODS

fortniteClient.Login()

fortniteClient.Lookup("jryd")
fortniteClient.CheckPlayer("jryd")
fortniteClient.GetStatsBR("jryd", "pc")
fortniteClient.GetStatsBRFromID("12345", "pc")
fortniteClient.GetFortniteNews()
fortniteClient.CheckFortniteStatus()
fortniteClient.GetFortnitePVEInfo("en")
fortniteClient.GetStore("en")

fortniteClient.KillSession()

More information on the mentods can be found in the GoDoc.

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.