Best practice for calling 3P APIs with private credentials from SvelteKit SPA on Appwrite Sites
- 0
- Web
- Sites
- Cloud
- Functions
- REST API

Hey everyone! Looking for guidance on the recommended approach for securely calling third-party APIs from my Appwrite-hosted application.
Current Setup:
- SvelteKit application running as a SPA (client-side only)
- Deployed on Appwrite Sites
- Using Appwrite for auth and database
What I need to do: I need to make API calls to external services (e.g., payment processors, data providers) that require private API keys/credentials. Obviously, I can't expose these credentials in my client-side code.
What I'm considering:
- Using Appwrite Functions as a proxy/backend to store credentials and make the API calls
- Converting my SvelteKit app to SSR (a much larger overhaul of the codebase including auth migration which I'd like to avoid if possible)
- Some other Appwrite-native solution I'm not aware of?
Questions:
- What's the recommended pattern within the Appwrite ecosystem for this use case?
- If Appwrite Functions is the way to go, are there any examples or best practices for using them as an API proxy?
- Are there any performance or rate limit considerations I should be aware of?
- Should I be looking at a different Appwrite deployment option altogether?
Would appreciate any insights from those who've solved similar problems. Thanks!
Recommended threads
- Issue with database event trigger for a ...
I created a function hosted it on aperture connected it to my domain, in the settings I added da collection to listen to any time a new document is created , it...
- New pricing is mental.......
I have 13 small test projects for different apps. Very little traffic. Paying today $15/month. Do I understand correctly this will be $25+13*$15 = $220 ? So fr...
- Can't add a payment option
When I try to purchase a paid plan, I can't add neither a local Visa Card nor a Revolut card, I get a generic "A processing error occurred." message. What can I...
