manyfold icon indicating copy to clipboard operation
manyfold copied to clipboard

Download files from MyMiniFactory

Open Floppy opened this issue 7 months ago • 7 comments

Work in progress; the code will work, but in order to access download URLs, we need to use a different OAuth flow, just API key isn't good enough.

Floppy avatar Jul 09 '25 15:07 Floppy

I think I'm being a fool; can't find the MMF Client ID and secret anywhere...? 😵‍💫

Floppy avatar Jul 10 '25 11:07 Floppy

I think I'm being a fool; can't find the MMF Client ID and secret anywhere...? 😵‍💫

I was just looking into this and thinking I should work on this, but seems like you've already got it going. I managed to get a working cobbled together solution just using postman and their API docs so maybe I can contribute what I know:

To do anything with their API, you have to go create a developer application. The Client ID they ask for in the auth flow is going to be the slug you create for the application. It's labeled as Oauth "Client key" or application slug in the dev app page (shown below) image

From there you have two options. The simpler way would be to use their implicit auth flow, which would probably be fine from a security standpoint since I would bet most people are self-hosting their personal stuff. If you want to do it the right way though, you should use the explicit auth flow. You first use the client ID to request a client secret with the authorization URL below (from the API docs) image

Then you use that code with their token URL (which I'm now realizing is incorrect in their docs here lol)

Anyways, it's outlined in more detail here and this version of the docs has the correct token URL: https://github.com/MyMiniFactory/api-documentation/blob/master/oauth2-instructions.md

Happy to contribute to this in any other way I can. Unfortunately I'm not familiar enough with Ruby to actually be useful from a dev perspective.

brheinfelder avatar Jul 11 '25 06:07 brheinfelder

Thanks, I'm used to situations where I'm given the client key and secret, so I ended up a bit confused. I'll dig in a bit more next week!

Floppy avatar Jul 11 '25 08:07 Floppy

Looking forward to this!

Crawford421 avatar Jul 14 '25 13:07 Crawford421

Get any time to look into this?

I'd be interested in helping debug/test.

ccatlett1984 avatar Nov 11 '25 22:11 ccatlett1984

Not had chance to get back to this yet, sorry! Bit constrained on time at the moment :)

Floppy avatar Nov 12 '25 09:11 Floppy

@planetflake has been working on this. Biggest issue currently, there is not a way to get all the object id's from your library via the api (yet, it's been requested.)

https://github.com/planeflake/manyfold He's also adding some other stuff.

ccatlett1984 avatar Nov 18 '25 22:11 ccatlett1984