Currents Owner Interface (OpenClaw)
When to use
Use when you are the API owner and want end-users to consume Currents through your product without exposing owner credentials.
Core policy
- Never expose owner key in browser/mobile clients.
- Currents calls must go backend -> Currents only.
- Read the key from the environment (
CURRENTS_API_KEY).
Need an API key?
If you do not have a Currents API key yet, register here:
Procedure
- Build backend endpoints:
POST /api/news/latestPOST /api/news/search
- Validate/allowlist query params (
keywords,query,language,country,category,start_date,end_date,domain,domain_not,author,page_size,page_number,cursor). - Use safe defaults (
language=en,page_size=10, maxpage_size<=100). - Call Currents v2 endpoints with
Authorization: Bearer ${CURRENTS_API_KEY}. - Enforce per-user + per-IP rate limits and product quotas.
- Add cache:
- latest-news TTL: 30-120s
- search TTL: 5-30m
- Normalize response to stable schema (
status,items,pagination,meta).
Date filtering (UTC+0)
start_dateandend_dateshould be RFC3339 / ISO-8601 parseable.- Treat Currents filters and returned
publishedvalues as UTC (+0000). - Convert user-local date ranges to UTC in backend before request.
- Prefer half-open ranges in your app logic:
published >= start_dateandpublished < end_date.
Example:
- Local (UTC+7):
2026-04-09 00:00to2026-04-10 00:00 - Send UTC:
start_date=2026-04-08T17:00:00Zend_date=2026-04-09T17:00:00Z
OpenClaw-specific credentials wiring
- Configure skill entry in
openclaw.jsonunderskills.entries.news-api-currents. - Reference
CURRENTS_API_KEYunder the skill entry'senvobject; do not place the key value in the skill file. skills.entries.*.envaffects host-run context; sandbox env must be configured separately.
WAF/User-Agent pitfall (learned)
A default script fingerprint can be blocked by upstream Cloudflare/WAF. Observed failure mode:
403- Cloudflare
error code: 1010
Mitigation:
- Do not rely on default Python urllib UA (
Python-urllib/...). - Send explicit browser/curl-like
User-Agentin backend HTTP calls. curlorrequestswith explicit UA is typically accepted.- Keep bearer auth unchanged.
Verification
- No key in frontend bundle/network payloads.
- Key loaded from the environment.
- Validation/rate limiting enabled.
- Cache hit ratio measurable.
- 400/401/429/5xx mapped consistently.
- Backend client sets explicit
User-Agent.