MixV2 / EpicResearch

Research about Epic Games' non-documented API
350 stars 84 forks source link

Can't get the steps described working to generate a deviceId #1

Closed james-bw closed 4 years ago

james-bw commented 4 years ago

First thanks for putting this research together!

I've been trying all day to work out the generation of the deviceId, via Postman. Your instructions are:

Authenticate yourself with an fortniteIOSGameClient token with your preferred method of authentication.

Call https://account-public-service-prod.ol.epicgames.com/account/api/public/account/{accountId}/deviceAuth with method POST. Your response should look something like:

{
  "deviceId": "...",
  "accountId": "...",
  "secret": "...",
  "userAgent": "Any HTTP Client/0.1",
}

So "Authenticate yourself with an fortniteIOSGameClient" - I go to the table later in the document and pull out:

Client Name Client ID   Secret
fortniteIOSGameClient   3446cd72694c4a4485d81b77adbb2141    9209d4a5e25a457fb9b07489d313b41a

Using these I login via OAuth: image

I then reuse the client ID in the URL for the deviceAuth (X below), and use the generated OAuth token as a bearer token in the authentication of the second request:

image

The result is:

Sorry your login does not posses the permissions 'account:public:account:deviceAuths CREATE' needed to perform the requested operation

What am I doing wrong?

MixV2 commented 4 years ago

Hello!

Sorry for the late response. You are specifying the 'clientId' in the final request (3446cd72694c4a4485d81b77adbb2141) - this is not the correct flow, you should instead be specifying your own account id. Let me know if that fixes the error.

Have a good day!

On March 24, 2020 at 5:21 AM, james-bw notifications@github.com wrote:

First thanks for putting this research together!

I've been trying all day to work out the generation of the deviceId, via Postman. Your instructions are:

Authenticate yourself with an fortniteIOSGameClient token with your preferred method of authentication.

Call https://account-public-service-prod.ol.epicgames.com/account/api/public/account/{accountId}/deviceAuth with method POST. Your response should look something like:

{ "deviceId": "...", "accountId": "...", "secret": "...", "userAgent": "Any HTTP Client/0.1", }

So "Authenticate yourself with an fortniteIOSGameClient" - I go to the table later in the document and pull out:

Client Name Client ID Secret fortniteIOSGameClient 3446cd72694c4a4485d81b77adbb2141 9209d4a5e25a457fb9b07489d313b41a

Using these I login via OAuth:

I then reuse the client ID in the URL for the deviceAuth (X below), and use the generated OAuth token as a bearer token in the authentication of the second request:

The result is:

Sorry your login does not posses the permissions 'account:public:account:deviceAuths CREATE' needed to perform the requested operation

What am I doing wrong?

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub, or unsubscribe.

james-bw commented 4 years ago

It didn't help, but thanks for the response.

I'm going to work through the example code in the fortnite-basic-api, as that's now working. I'll post an update here when I can.

MixV2 commented 4 years ago

Alright, let me know how it goes

MixV2 commented 4 years ago

Going to assume this is closed now, let me know if you still need any help with this