Hi James,
Thanks for the response, but I think there's a misunderstanding —
the issue is not OAuth 2.0 IP restrictions.
The block is happening at the Cloudflare edge layer, BEFORE the
request ever reaches your API. Cloudflare returns HTTP 403 with
"cf-mitigated: challenge" and a JS challenge HTML page directly,
without forwarding the request to FatSecret's backend at all.
Your OAuth 2.0 IP whitelist (which I have already set wide open)
operates at a different layer — it cannot affect requests that
Cloudflare blocks upstream.
Two clarifications:
1. We're using OAuth 1.0 3-legged (request_token / authorize /
access_token), not OAuth 2.0. The OAuth 2.0 IP whitelist in
"Manage API Keys" does not apply to this flow.
2. Only
www.fatsecret.com/oauth/* is behind Cloudflare and blocks
server-side clients.
platform.fatsecret.com (the REST API) is
on AWS without Cloudflare and works fine — including from our
server with no special configuration.
Concrete repro from our server (any User-Agent, any TLS fingerprint,
including curl-impersonate-chrome):
$ curl -X POST
https://www.fatsecret.com/oauth/request_token HTTP/2 403
cf-mitigated: challenge
server: cloudflare
cf-ray: 9f86843b7c3ee5dc-HEL
This breaks server-side 3-legged OAuth 1.0 entirely, because
request_token must be obtained from the server (consumer_secret
cannot be exposed to the browser).
Could you either:
(a) whitelist our server IP 83.166.247.212 at the Cloudflare
layer for /oauth/* endpoints on
www.fatsecret.com, or
(b) confirm the supported server-side flow for connecting an
existing FatSecret user account given that:
- OAuth 2.0 client_credentials cannot access user-scoped
endpoints (food_entries.get, weight.get_month),
- OAuth 1.0 request_token is unreachable from any server.
Forwarding to your platform/infrastructure team would help — this
is a Cloudflare configuration question, not an OAuth credentials
question.
Note: per your IP restrictions tooling on our account tier
(single IPs only, CIDR requires Premier), our server IP
83.166.247.212 is already explicitly whitelisted. The 403 we
see is from Cloudflare upstream, not from your API IP filter.
Thanks,
Oleg