Wix set up
Store Your MLS API Key in Wix
Where Wix keeps secrets, how Velo backend code reads the key, and how to check it never reaches the page.
Part of the Wix MLS API Integration guide · Last reviewed 2026-11-20

In Wix, an API key belongs in the Secrets Manager. Add a secret named SAIGE_MLS_API_KEY with your key, and SAIGE_MLS_API_URL with the feed address. Backend code reads them with getSecretValue from wix-secrets-backend.v2. Wix's examples wrap it in elevate from wix-auth, so the code can read the secret whatever the visitor's own permissions, and the value never leaves the backend.
Key takeaways
- Add both secrets in the Secrets Manager.
- Read them with secrets.getSecretValue in a backend .web.js file.
- Wrap the call in elevate, as Wix's examples do.
- The older getSecret method was scheduled for deprecation. Use getSecretValue.
Need the data feed for this? Saige is an approved MLS data vendor in BC. Send a request and our team will contact you.
Where Wix keeps secrets
Wix's docs say the older getSecret() in wix-secrets-backend was slated for deprecation on September 7, 2025, and point to getSecretValue in wix-secrets-backend.v2. New code should use the v2 method.
- Turn on Velo for the site.
- Open the Secrets Manager and add SAIGE_MLS_API_KEY with your key.
- Add SAIGE_MLS_API_URL with the feed address.
- Create backend/mls.web.js with the code below.
Reading the key in Velo backend code
This backend file follows the pattern in Wix's own getSecretValue examples: import the secrets module, wrap getSecretValue with elevate, and export a webMethod the page can call.
// backend/mls.web.js
import { Permissions, webMethod } from 'wix-web-module';
import { secrets } from 'wix-secrets-backend.v2';
import { fetch } from 'wix-fetch';
import { elevate } from 'wix-auth';
const getSecret = elevate(secrets.getSecretValue);
export const getListings = webMethod(Permissions.Anyone, async () => {
const key = await getSecret('SAIGE_MLS_API_KEY');
const base = await getSecret('SAIGE_MLS_API_URL');
const filter = encodeURIComponent("StandardStatus eq 'Active'");
const res = await fetch(`${base}/Property?$filter=${filter}&$top=24`, {
method: 'get',
headers: { Authorization: `Bearer ${key}` },
});
const data = await res.json();
return data.value; // listing data only, never the key
});Check before you publish
Open the published Wix site, view the page source, and search for the first characters of your key. It must not be there. Then use the search page with the browser's network panel open: requests should go to your own server code, not straight to the feed address. The full check list is at Keep Your MLS API Key Secret on an AI-Built Site.
Frequently asked questions
Why wrap getSecretValue in elevate?
Wix's examples do it so the backend can read the secret even when the visitor calling the method has no rights to secrets.
Can the page code call the feed directly?
No. Page code runs in the browser. It calls getListings from backend/mls.web, which calls the feed.
Related pages in this guide
Sources
Every claim on this page that could be checked against a primary source is linked below. Where something is not publicly documented by a vendor, the page says so rather than filling the gap with an estimate.
- getSecretValue() (Wix)
- webMethod() (Wix)
- Current member (frontend) (Wix)
- Secrets Management Cheat Sheet (OWASP Foundation)