Usage of API from distributed clients

46 views
Skip to first unread message

Nicholas Polet

unread,
May 19, 2022, 5:32:42 AM5/19/22
to Freesound API
Hi, I could do with some pointers on how best to use the API in lots of different clients.

The example here is integrating the freesound library with a game engine. I'm looking to create an addon for a game engine that allows users to browse/search the wonderful library on freesound.org and use them within game projects.

I can see a few options for handling the API requests and key here.
  • Bundle the API key into the addon, and use the same key for everyone. This would mean that all users of the addon would be using the same key, but I think this would hit the api limits quite quickly.
  • Create my own endpoint on my server, which acts as a middle man for the requests. This keeps the API key a secret, but still has the issue of hitting limits quickly.
  • Ask each user of the addon to request their own API key, and have them enter it into the addon before use. This has the benefit og having per user limits, but requires each user to request their own key.
There are probably a few more scenarios that could be taken.

Basically, I'm really interested in exposing the freesound library to game engines, but I want to do it in a way that doesn't disrupt the platform and is well within the terms of use.

Any pointers on how to start this journey would be really helpful.

Thanks,
Nick

Frederic Font Corbera

unread,
May 31, 2022, 7:51:44 AM5/31/22
to freeso...@googlegroups.com
Hi Nick,

Sorry for the late reply and thanks for working on this addon!

The ideal solution is that each user requests her own key. If you think however that this would make things difficult for users, you could decide to do some hybrid solution: you can bundle a key which is the same for everyone but might hit limits. Then ask users to replace the key by their own if they are to make a "serious" use of the addon. That would allow users to quickly start using it and then switch to their key if they like it and want to continue using it. The option of having some server in the middle would require maintenance on your side and would not actually fix the problem. 

Let us know how the addon development goes, and we can publish it in labs.freesound.org when ready.

Cheers,


frederic

--
Frederic Font - ffont.github.io
Music Technology Group, UPF - mtg.upf.edu
Freesound - freesound.org



--

---
You received this message because you are subscribed to the Google Groups "Freesound API" group.
To unsubscribe from this group and stop receiving emails from it, send an email to freesound-ap...@googlegroups.com.
To view this discussion on the web, visit https://groups.google.com/d/msgid/freesound-api/34883c82-6213-4158-953f-338ad5f42c12n%40googlegroups.com.
Reply all
Reply to author
Forward
0 new messages