qlaffont / fortnite-api

Fortnite API, Get Stats, News And Status
https://twitter.com/qlaffont
MIT License
355 stars 86 forks source link

How can i get tokens? #74

Closed JustCarry closed 6 years ago

JustCarry commented 6 years ago

I really didn't understand about how can i get tokens,

I'm stick on Epic game launcher step..

I launch it then i did go to fiddler, and trying to find /account/api/oauth/token request and i didn't found it!

please help me at this step..

savisaar2 commented 6 years ago

Hi JustCarry, Just so you are aware you must FIRST open fiddler so it can snoop on your packets and then look for the referenced urls in the program once you have opened the launcher. In summary:

JustCarry commented 6 years ago

i cannot find /account/api/oauth/token in fiddler

savisaar2 commented 6 years ago

Tools->Options->HTTPS->Decrypt HTTPS checked?

JustCarry commented 6 years ago

nope

savisaar2 commented 6 years ago

Okay make sure that is checked then you should be able to find the packet

towner-10 commented 6 years ago

I can get the Launcher token, but Fortnite will not login with Fiddler open. Is there a fix?

savisaar2 commented 6 years ago

This is recent i am having the same problem unfortunately i have no idea

towner-10 commented 6 years ago

I think they might have blocked Fiddler somehow.

KindaIntellectual commented 6 years ago

Doesn't seem to work with auto login. After I launched Fiddler, and then the Epic launcher, I signed out (of Epic) and then signed back in and found the token in fiddler.

savisaar2 commented 6 years ago

Are you sure that works because i couldnt login wgen fiddler active

On Fri, 4 May 2018, 7:09 am Raven, notifications@github.com wrote:

Doesn't seem to work with auto login. After I launched Fiddler, and then the Epic launcher, I signed out (of Epic) and then signed back in and found the token in fiddler.

— You are receiving this because you commented.

Reply to this email directly, view it on GitHub https://github.com/qlaffont/fortnite-api/issues/74#issuecomment-386445789, or mute the thread https://github.com/notifications/unsubscribe-auth/ANK6vENmtD5UY-ksS_dktVja760HX8Xbks5tu3kegaJpZM4TvQAw .

jeffreyhorner commented 6 years ago

@KindaIntellectual I tried your solution of signing out (via the launcher) and back in and it didn't work for me. As soon as I turn off Fiddler HTTPS decryption, I'm able to launch the game without having to sign in.

qlaffont commented 6 years ago

I have make some test and i'm agree Fortnite have blocked Fiddler in Game starting process. We need an another way to found the second token 🤔

qlaffont commented 6 years ago

Okay i found it :

Can you confirm this, for me it's working.

towner-10 commented 6 years ago

I cant get your fix to work, can you specify exactly when to enable Capture Traffic?

jeffreyhorner commented 6 years ago

The new steps don't work for me as well.

In fact Fiddler has stopped intercepting HTTPS traffic for my fortnite executable.

Also, I noticed that when I'm running discord it sends my Client Launcher token to to the following URLS:

discordapp.com/api/v6/oath2/application/... discordapp.com/api/v6/science

qlaffont commented 6 years ago

I have edited my message @Tntcommando1 and @jeffreyhorner you need to do the exact process described before.

jeffreyhorner commented 6 years ago

Sorry, still doesn't work for me.

qlaffont commented 6 years ago

I have do the exact process (i have tried in the last 5 min) that i have described you in my previous message. So, do it point by point and it's working.

himanmenGit commented 6 years ago

Not working process. Can you take a video?

qlaffont commented 6 years ago

I don't have time to do it. But the exact process is working. If you don't respect, precisely the process is not working.

himanmenGit commented 6 years ago

Ok. Thank you. I'll keep trying.

da772 commented 6 years ago

@qlaffont 's workaround also didn't work for me.

I had to get the Client Auth Token through the Fortnite iOS app:

Computer Steps -Install & Open Fiddler 4 on computer -In Tools -> Options -> HTTPS, Select Capture HTTPS Connects -> Decrypt HTTPS traffic -> ...from remote clients only -In Tools -> Options -> Connections(take note of fiddler port) -> Select - Allow remote computers to connect -Allow fiddler to connect through windows firewall (inbound/outbound) -Find computer's local ip (Windows: type /ipconfig in command prompt)

iOS Steps -Connect to the same network as the computer with fiddler -go to Settings -> Wi-Fi -> (your wifi name) press the (i) next to it -scroll down to Configure Proxy -> Manual -> Server: (type computers local ip address) | Port: fiddler's port (default is 8888) | do NOT enable authentication -> save (top right) -in iOS browser go to this website http://ipv4.fiddler:8888 (replace 8888 with fiddler's port)(type it out fully!) -click on the hyper link that reads: You can download the FiddlerRoot certificate -install certificate, press done -go to Settings -> General -> About-> Certificate Trust Settings (at the bottom) -> enable full trust for DO_NOT_TRUST_FiddleRoot -Make sure Fiddler on computer is capturing. -Open Fortnite app and login (relog if already logged in) -On computer Fiddler should now have /account/api/oauth/token (This is your Client Token)

Fiddler iOS documentation

bpar476 commented 6 years ago

I've also had trouble trying to get the Fortnite token, even when disabling capture and enabling it once the game finished loading. I haven't been able to find a window where I can enable capture and still log into the game. I haven't tried @da772 's suggestion yet but maybe you want to re-open this issue so other developers that come across your API can see that people are still having issues getting the Fortnite token with Fiddler on PC.

qlaffont commented 6 years ago

@da772 my procedure is only for Fortnite on PC.

@bpar476 capture all requests (not a specified window) after that you just need to do the procedure and after that you can found oauth request with a CTRL + F

bpar476 commented 6 years ago

@qlaffont Sorry I wasn't clear, when I said window I meant window of time as in, disabling and re-enabling didn't work for me, poor language on my part. Perhaps there is a difference in behaviour depending on the server. I am connecting to the OCE servers.

When I turn on capture and the game is saying "Logging into Epic Services" I would expect there to be some traffic picked up in Fiddler but there is nothing at all. I think that the procedure you've described doesn't work in all cases. Unless I'm doing something wrong.

qlaffont commented 6 years ago

@bpar476 you need to turn on when loading screen change to login screen.

bpar476 commented 6 years ago

@qlaffont I just tried again, enabling capture as soon as the loading screen transitions to the logging in/connecting screen. No Fortnite traffic in Fiddler at all during that time. I have HTTPS Connect enabled and I have decrypt HTTPS traffic enabled also.

eshao731 commented 6 years ago

I tried it many times, but I couldn't get Fortnite token till now.

DylanMcGee commented 6 years ago

@eshao731 what did you do differently to get the Fortnite token?

eshao731 commented 6 years ago

@DylanMcGee @bpar476 Are you sure you can get the Fortnite token now? Can Fortnite login with Fiddler open?

bpar476 commented 6 years ago

No, I still can’t get the token. The way you worded your comment it seemed like you were able to get the token.

DylanMcGee commented 6 years ago

@bpar476 @eshao731

I looked into the documentation for the PHP api and they have a shared token. I'm not sure if there is a limit to how many calls you can do with this, but I was able to run a few hundred calls without issue.

3rd parameter (epic games launcher token) : "MzRhMDJjZjhmNDQxNGUyOWIxNTkyMTg3NmRhMzZmOWE6ZGFhZmJjY2M3Mzc3NDUwMzlkZmZlNTNkOTRmYzc2Y2Y="

4th parameter (fortnite token) : "ZWM2ODRiOGM2ODdmNDc5ZmFkZWEzY2IyYWQ4M2Y1YzY6ZTFmMzFjMjExZjI4NDEzMTg2MjYyZDM3YTEzZmM4NGQ="

eshao731 commented 6 years ago

@DylanMcGee Thank you for your answer. I've just finished reading the PHP api .The code is valid.

qlaffont commented 6 years ago

@DylanMcGee & @eshao731, they share their token. I didn't share my tokens because it's a security issue and if Epic Games want to cancel my token i need to renew it and modify the token on my fortnite-api.

qlaffont commented 6 years ago

You can check the new Readme.Md on Master Branch. The Readme.md was updated.

DylanMcGee commented 6 years ago

@qlaffont Thanks for putting this package together. Didn’t want to come across as ungrateful this is some good work you did.

qlaffont commented 6 years ago

No problem, I just explain why I do that ^^. This package was created by me, but I want some contributions from other devs ^^. Every comments and suggestions is important 👌!

eshao731 commented 6 years ago

@qlaffont Their launcher token is the same as the token I get,Isn't their fortnite token same as yours?

qlaffont commented 6 years ago

It's seems that I have the same Launcher/Fortnite Token. So you can use it, but i will not edit my code because if they change it I want to be sure that every developers can change it easily.

eshao731 commented 6 years ago

Thank you for your answer!

qlaffont commented 6 years ago

No problem ^^. I consider this issue close.

You can use the dedicated procedure in Readme.md or you can use this token (They can change any time) :

3rd parameter (epic games launcher token) : "MzRhMDJjZjhmNDQxNGUyOWIxNTkyMTg3NmRhMzZmOWE6ZGFhZmJjY2M3Mzc3NDUwMzlkZmZlNTNkOTRmYzc2Y2Y="

4th parameter (fortnite token) : "ZWM2ODRiOGM2ODdmNDc5ZmFkZWEzY2IyYWQ4M2Y1YzY6ZTFmMzFjMjExZjI4NDEzMTg2MjYyZDM3YTEzZmM4NGQ="

bpar476 commented 6 years ago

Great work troubleshooting this issue guys. I look forward to seeing what I can do with this sweet api 😁

zachsamuels commented 6 years ago

The shared token no longer works and throws an error. I tried with 2 different apis and it doesn't work. Any chance we could get another one to share if someone is willing to be nice?

monkeydioude commented 6 years ago

Are you sure about this ? Still working on my side.

Fyb3roptik commented 5 years ago

Looks like these credentials have been hosed. Getting an error from EPIC that the token is not valid

rebug1337 commented 5 years ago

Fortnite just released a new api update, issue retrieving new auth token.

Turbski commented 5 years ago

Anyone got the new fortnite api bearer key?

juanpablofortnite commented 5 years ago

I have this php code to see the store, do you think having the token would work? https://i.imgur.com/CAdaoO8.png

DanyIonut2580 commented 4 years ago

hey anyone ?

DanyIonut2580 commented 4 years ago

?