What your app can do
Backends and API keys
A backend is the part of your app that visitors never see. It runs on Puter instead of in the visitor's browser, so it can keep shared information and hold secrets such as API keys. The builder writes it for you.
When your app gets a backend
You do not have to ask for a backend by name. The builder adds one when your idea needs it, for example when:
- Information is shared between visitors, such as a guestbook, bookings or a leaderboard.
- Your app takes payments or sends email.
- Your app talks to another service that needs a key, such as a weather, maps or delivery service.
There is nothing to install or switch on. The backend is part of your project, it works in the preview, and it goes live when you publish.
What an API key is
An API key is a long password that another service gives you, so your app can use that service on your behalf. Stripe gives you one to take payments. A weather service gives you one to fetch forecasts. Anyone who has the key can act as you, so it has to stay private.
Give the builder a key
Get the key from the service
Sign in to the service and copy the key from its settings. If you are not sure where it is, ask the builder. It will tell you where to look.
Paste it into the chat
Send the key to the builder in a message, for example "Here is my weather service key" followed by the key.
Allow it, if asked
Puter may ask you to let the builder store information for your app. Allow it so the key can be saved. You are not asked again each time.
Where your key is kept
The builder stores the key in your backend's private storage. It is not written into your pages or your project files, so it does not appear in the code view, in a download, or on GitHub, and visitors to your site cannot read it.
To replace a key, paste the new one into the chat and say which one it replaces. It takes effect right away.
Test keys and live keys
Many services give you two keys. A test key is for trying things out, and a live key does the real thing, such as charging a real card. The preview and your published site can each have their own.
- While you build, give the builder a test key. The preview uses it.
- When you publish, the keys from the preview are copied to your live site, so it works straight away.
- When you are ready for the real thing, publish first, then give the builder your live key and say it is for the live site. Only the published site uses it. The preview keeps the test key, so you can keep testing safely.
Good to know
Share keys only in the chat with the builder. Do not type a key into a page or a file yourself, because files are part of the site your visitors load.
The preview and the live site also keep separate data. An order placed in the preview does not appear on your published site.