Authenticating to the Epic Games Services (EGS) API
Step 1: Obtain an Authentication Code for your Account
- Navigate to EpicGames.com and login with the account you want to use with the API.
- Once you're logged in, click on the link below to generate an
Auth Code: - Navigating to that URL will provide you with a
JSONformatted text string that looks like the one below:
Copy the value of the authorizationCode which, in this case, would be:
155064ef39b144f4b1ffd6fac4905c86
Step 2: Use the Authorization Code to Generate an Access Token
NOTE: The auth code expires after 5 minutes. If Step 2 is not completed within 5 minutes of Step 1, you will have to obtain a new Authorization Code.
- To generate an Access Token, you will be sending a
POSTrequest to the following URL:https://account-public-service-prod.ol.epicgames.com/account/api/oauth/tokenwith the following configuration:- Headers:
- Content-Type:
application/x-www-form-urlencoded - Authorization:
basic MzQ0NmNkNzI2OTRjNGE0NDg1ZDgxYjc3YWRiYjIxNDE6OTIwOWQ0YTVlMjVhNDU3ZmI5YjA3NDg5ZDMxM2I0MWE=
- Content-Type:
- Body:
- grant_type:
authorization_code - code:
YOUR_AUTHORIZATION_CODE_FROM_STEP_1
- grant_type:
- Headers: