I've just noticed the portal update broke my mod uploader (in the vscode mod debugger extension), and thought I might as well ask for some real docs/support this time before i start reverse engineering again to update it!
Is there (or can there be) a documented API way to get logged in for uploading, rather than scraping the login page for a form to submit? Ideally I'd love to just have you generate an oauth token (or equivalent) that can be copied into vscode for me to use, rather than having to handle user credentials directly. Can I use the service-token somehow for uploading mods?
Also, I previously only supported uploading updates to existing mods because there was no way for me to test (and thus reverse engineer) uploading new mods without spamming a ton of new mods on the portal (I keep the update testing contained/hidden by using a deprecated mod, jargtestmod). I would love some kind of "dummy" empty clone of the portal that just deletes uploaded mods after a while (an hour? a day?) for doing portal API tests against, if that's at all reasonable to create.
Mod Portal Upload API Docs (for VSCode Extension)
-
- Filter Inserter
- Posts: 302
- Joined: Fri Mar 18, 2016 4:34 pm
- Contact:
-
- Filter Inserter
- Posts: 302
- Joined: Fri Mar 18, 2016 4:34 pm
- Contact:
Re: Mod Portal Upload API Docs (for VSCode Extension)
For anyone else updating tools: the new login process is picky about the referer header on the submitted login form too, in addition to the form content (including csrf token of course)
The upload itself appears to work as-is.
The upload itself appears to work as-is.
-
- Filter Inserter
- Posts: 302
- Joined: Fri Mar 18, 2016 4:34 pm
- Contact:
Re: Mod Portal Upload API Docs (for VSCode Extension)
Another update seems to have added a captcha, totally thwarting my attempts to have automated uploading tools. Please can i have a real upload api?
- eradicator
- Smart Inserter
- Posts: 5207
- Joined: Tue Jul 12, 2016 9:03 am
- Contact:
Re: Mod Portal Upload API Docs (for VSCode Extension)
+1 for upload api
I've put a link in the one-line-suggestions thread. The captcha is also really annoying for normal usage...
I've put a link in the one-line-suggestions thread. The captcha is also really annoying for normal usage...
Author of: Belt Planner, Hand Crank Generator, Screenshot Maker, /sudo and more.
Mod support languages: 日本語, Deutsch, English
My code in the post above is dedicated to the public domain under CC0.
Mod support languages: 日本語, Deutsch, English
My code in the post above is dedicated to the public domain under CC0.
-
- Fast Inserter
- Posts: 128
- Joined: Thu Feb 08, 2018 8:25 am
- Contact:
Re: Mod Portal Upload API Docs (for VSCode Extension)
+1 for 'the CAPCHA killed my tool' bucket - I don't know how many others were using it as well for their mods, but at least a few. https://github.com/shanemadden/factorio ... al-publish
I know it's not a ton of work to roll the zip by hand and click around in the web ui by hand, but it really does make a big difference in terms of friction if we can let an automated process handle it instead of clicking through a web form, especially when multiplying that laborious clicking by a large number of mods.
I know it's not a ton of work to roll the zip by hand and click around in the web ui by hand, but it really does make a big difference in terms of friction if we can let an automated process handle it instead of clicking through a web form, especially when multiplying that laborious clicking by a large number of mods.
Re: Mod Portal Upload API Docs (for VSCode Extension)
My mod library is getting large enough that I'm getting hesitant about making more if I'm going to have to use the manual process to update them for new Factorio versions. Changing folder name, updating info.json version number. Updating the changelog with a "updating for new factorio version" line. Zipping. And then a manual upload process on top of that. For each and every mod. And it's especially silly to do manually for a game about automation.
I'm getting ready to automate, so I hope that it is not going to be impossible now...
I'm getting ready to automate, so I hope that it is not going to be impossible now...
Hey, cool stuff!shanemadden wrote: ↑Sun Jul 26, 2020 6:24 pm +1 for 'the CAPCHA killed my tool' bucket - I don't know how many others were using it as well for their mods, but at least a few. https://github.com/shanemadden/factorio ... al-publish
My mods: Capsule Ammo | HandyHands - Automatic handcrafting | ChunkyChunks - Configurable Gridlines
Some other creations: Combinassembly Language GitHub w instructions and link to run it in your browser | 0~drain Laser
Some other creations: Combinassembly Language GitHub w instructions and link to run it in your browser | 0~drain Laser
-
- Filter Inserter
- Posts: 302
- Joined: Fri Mar 18, 2016 4:34 pm
- Contact:
Re: Mod Portal Upload API Docs (for VSCode Extension)
minor update: the captcha now seems to not appear on at least the first attempt so if your creds are good tools work again!
-
- Fast Inserter
- Posts: 128
- Joined: Thu Feb 08, 2018 8:25 am
- Contact:
Re: Mod Portal Upload API Docs (for VSCode Extension)
Thanks for the tip, got the github action updated and working again.justarandomgeek wrote: ↑Wed Jul 29, 2020 12:24 pm minor update: the captcha now seems to not appear on at least the first attempt so if your creds are good tools work again!