Search code examples
javascriptpythonnode.jsaxiosnode-fetch

Unable to get authorizationCode from EpicGames API


I've been working on a project which requires to get a deviceAuth code, and requires you to have a valid and logged into Web Browser Epic Games/Fortnite Account to use this endpoint, which I have done, but if I go DIRECTLY to the API in the Browser, it returns the authorizationCode; yet returns 'null' via any form of Library for any language, I have tried both Python versions and NodeJS versions with still no avail:

const axios = require("axios");
const codeEndpoint =
  "https://www.epicgames.com/id/api/redirect?clientId=3446cd72694c4a4485d81b77adbb2141&responseType=code";


async function codeFetch(url) {
  const res = await axios.get(url);
  return res.data;
}

codeFetch(codeEndpoint).then((r) => console.log(r.authorizationCode));

Privacy Concerns: The clientId is public usage/public domain, it is used in such as Fortnite-API and many other libs

Solution

  • Unfortunately, found out this endpoint CANNOT be automated, as a security measure implemented by EpicGames themselves.