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
- Why "You’ve reached the limit for your G...
Why did Appwrite send me this alert when the usage reached 10605%? Is it too late? Why not when reached 100% usage? And I can not pay for more usage described ...
- Subdomain failed verification
So I wanted to do a custom subdomain, because local storage doesn't work for me, but I've tried it a long time ago, it didn't work for me, and now I'm trying ag...
- Sites 30MB limit from GitHub
I’m deploying a site from github as Other type on the Hobby plan. It is actually a Flutter web app but it’s in a subdirectory with the root being an html landin...
