Keys / Unsplash
UNSPLASH_ACCESS_KEY
Your Unsplash app's Access Key, sent as Client-ID to search and fetch photos. Free; new apps start in demo mode at 50 requests an hour.
- Expires
- the docs don't say
- API
- none; apps page only
Get it
Create one on unsplash.com/oauth/applications. The steps aren't recorded yet.
Set it
UNSPLASH_ACCESS_KEY=...
The official SDKs take the key from your app; unsplash-js's own example passes process.env.UNSPLASH_ACCESS_KEY as accessKey. Or keep it out of .env with keypin: keypin run -- npm run dev
Replace it
- The docs don't describe regenerating a key. On Your apps, create a new application. It starts in demo mode at 50 requests an hour.
- If your traffic needs more, apply for production on the new app and wait for approval, which raises it to 1,000 an hour. Keep the old app in use meanwhile.
- Deploy the new Access Key everywhere that reads
UNSPLASH_ACCESS_KEY. Both keys work in the meantime. - Check that nothing still uses the old app's key. The docs don't say how to retire an app; ask
api@unsplash.com.
Set rotate_every on the key in keypin.toml and a rotated date on its vault item, and keypin status shows when it's due.