Stock Media Search Setup
Stock-media search powers the Search Online tab in Sosyabot's media library and composer. Three providers are supported, each enabled independently with its own API key:
- Unsplash (Access Key + Secret Key)
- Pexels (single API Key)
- Pixabay (single API Key)
Only the providers you configure here appear in the user-facing search dropdown.
End-user flow: Files → Stock Search.
Overview
| Provider | Form fields | Options keys |
|---|---|---|
| Unsplash | Access Key, Secret Key | unsplash_access-key, unsplash_secret-key |
| Pexels | API Key | pexels_api-key |
| Pixabay | API Key | pixabay_api-key |
There is no master Status toggle — each provider is implicitly enabled when its key is present, disabled when empty.
Unsplash
Step-by-step
- Sign up at https://unsplash.com/developers.
- Your apps → New Application. Accept the terms.
- Provide app name and description.
- The new app's page shows Access Key and Secret Key. Copy both.
Pasting
/admin/api-integration/online-media-search → Unsplash section:
- Access Key: paste.
- Secret Key: paste.
- Save.
Default rate limit: 50 requests/hour (Demo tier). Apply for Production access via Unsplash for 5,000/hour.
Pexels
Step-by-step
- Sign up at https://www.pexels.com/api/.
- Get Started → Generate API key.
- Copy the displayed key.
Pasting
/admin/api-integration/online-media-search → Pexels section:
- API Key: paste.
- Save.
Default rate limit: 200/hour, 20,000/month — generous for typical use.
Pixabay
Step-by-step
- Sign up at https://pixabay.com/api/docs/.
- Get my API key (after login).
- Copy the displayed key.
Pasting
/admin/api-integration/online-media-search → Pixabay section:
- API Key: paste.
- Save.
Default rate limit: 100/minute (very generous). Hotlinking displayed images is restricted; Sosyabot downloads the asset and stores it in the file library to comply.
Verification
/app/files/search-online → pick a provider in the dropdown → search a keyword → click any result → confirm it lands in the user's file library.
Troubleshooting
| Symptom | Cause | Fix |
|---|---|---|
| Provider missing from dropdown | Its API key is empty | Add the key in the admin form. |
| Unsplash search returns 401 | Wrong Access Key OR app exceeded Demo limit | Re-issue Access Key; apply for Production tier. |
| Pexels search returns 429 | Hourly rate limit hit | Wait — Pexels limit resets per-hour. |
| Pixabay shows results but selecting one fails to download | Outbound network issue from backend | Check [backend] logs; configure HTTP proxy via /admin/data/proxies if egress is restricted. |
ENV fallback
There is no ENV block for stock-media providers — admin panel only.