Site keys
Publishable and secret keys for listener-facing websites and apps that read a site’s public data.
Site keys are coming soon. This page describes how they will work so you can plan your integration. Header names and limits will be confirmed here before launch.
Public data, such as a station’s schedule, now playing and shows, will need a site key on every request that isn’t signed in as a user or app. The key tells Soundwaves which site is asking, so requests can be limited, measured and revoked per site.
Two kinds of key
| Publishable key | Secret key | |
|---|---|---|
| Starts with | swz_pk_ | swz_sk_ |
| Use it in | Browsers, mobile apps and simple integrations | Your own servers, such as a headless site’s server-side rendering |
| Is it secret? | No, it’s safe to ship in client code | Yes, it’s shown once when created |
| Origin check | The request’s origin must be one of the site’s domains or the key’s allowed origins | None |
| Limits | Standard | Higher |
What a key can reach
Each key belongs to one site, and a site can only read the networks linked to it. A key for a dedicated station site can’t read your organisation’s other stations.
Managing keys
Every site gets a default publishable key automatically. In Studio, under the site’s settings, you’ll be able to create keys, reveal a secret key once, set allowed origins, revoke keys and see when each was last used.