Page 1 of 1
[Resolv]How to download mods without login on Mod portal API
Posted: Sat Apr 28, 2018 7:21 am
by yuta0801
I want to make mods downloading tool.
Wiki says the Mod Portal API can download all mods available on the official Factorio mod portal without any kind of authentication or account information, but I cant found how to download mods without login
https://wiki.factorio.com/Mod_portal_API
Re: How to download mods without login on Mod portal API
Posted: Sat Apr 28, 2018 7:28 am
by steinio
yuta0801 wrote:I want to make mods downloading tool.
Wiki says the Mod Portal API can download all mods available on the official Factorio mod portal without any kind of authentication or account information, but I cant found how to download mods without login
https://wiki.factorio.com/Mod_portal_API
Wow that would be so great for software pirates, wouldn't be it?
Re: How to download mods without login on Mod portal API
Posted: Sat Apr 28, 2018 7:35 am
by Koub
I think you can use the API without authentication, but you'll probably need to be authenticated to actually DL a mod.
Re: How to download mods without login on Mod portal API
Posted: Sat Apr 28, 2018 1:09 pm
by eradicator
Simply ask the user for their service token. It's stored in player-data.json.
Re: How to download mods without login on Mod portal API
Posted: Sun Apr 29, 2018 12:23 am
by yuta0801
eradicator wrote:Simply ask the user for their service token. It's stored in player-data.json.
Can I download mod with token?
Re: How to download mods without login on Mod portal API
Posted: Sun Apr 29, 2018 12:37 am
by yuta0801
I can seve user's password or, every time download mods, ask password.
but, I don't think it is best practice.
Re: How to download mods without login on Mod portal API
Posted: Sun Apr 29, 2018 7:21 am
by eradicator
yuta0801 wrote:eradicator wrote:Simply ask the user for their service token. It's stored in player-data.json.
Can I download mod with token?
Sure. That's how the game does it. Just look at the console while using the in-game mod browser or something.
yuta0801 wrote:I can seve user's password or, every time download mods, ask password.
but, I don't think it is best practice.
Ask them for the path to player-data.json. It's already stored on disk :P
Re: How to download mods without login on Mod portal API
Posted: Sun Apr 29, 2018 8:27 am
by yuta0801
eradicator wrote:yuta0801 wrote:eradicator wrote:Simply ask the user for their service token. It's stored in player-data.json.
Can I download mod with token?
Sure. That's how the game does it. Just look at the console while using the in-game mod browser or something.
yuta0801 wrote:I can seve user's password or, every time download mods, ask password.
but, I don't think it is best practice.
Ask them for the path to player-data.json. It's already stored on disk
The program to get the token is completed, but I do not know how to download MOD with token...
Can you tell me the way of it in more detail? thank you.
Re: How to download mods without login on Mod portal API
Posted: Sun Apr 29, 2018 5:45 pm
by eradicator
/download/modname-goes-here/5aa906e9211f35000ae7c569?username=eradicator&token=<private>
Re: How to download mods without login on Mod portal API
Posted: Mon Apr 30, 2018 12:57 am
by yuta0801
eradicator wrote:/download/modname-goes-here/5aa906e9211f35000ae7c569?username=eradicator&token=<private>
Thank you!
Re: How to download mods without login on Mod portal API
Posted: Wed May 02, 2018 5:33 am
by yuta0801
I was able to make a beautiful tool for your help. Thank you!
viewtopic.php?f=69&t=60027
Re: How to download mods without login on Mod portal API
Posted: Wed May 02, 2018 8:42 am
by eradicator
Nice it worked out :). Btw quick look at your code i see it asks for 'Please enter your password', but the service token is not the password. So maybe you should change it to 'Please enter your service token'?
Re: How to download mods without login on Mod portal API
Posted: Thu May 03, 2018 9:18 am
by yuta0801
The app first looks for tokens from the player-data.json and, if not found, ask the username and password to retrieve the token from the API because I think the general user is not familiar with token.
Re: How to download mods without login on Mod portal API
Posted: Thu May 03, 2018 2:08 pm
by eradicator
yuta0801 wrote:The app first looks for tokens from the player-data.json and, if not found, ask the username and password to retrieve the token from the API because I think the general user is not familiar with token.
Ah. I wasn't sure if the API supplied a way of retrieving the token :). And i really only took a very short look at the code :p.