You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Use case: a JVM backend reads the payload of a remote config flag (settings, or encrypted values that PostHog decrypts) without a user context. Node.js and Python have getRemoteConfigPayload. posthog-server has nothing equivalent. evaluateFlags() and getFeatureFlagPayload() both need a distinct id.
Request: GET /api/projects/@current/feature_flags/{key}/remote_config?token={projectToken} with Authorization: Bearer {personalApiKey}. Node.js and Python send the same request.
Key: the existing personalApiKey in PostHogConfig, the one local evaluation uses. No new option.
Return: the decoded JSON payload, or null.
Errors: logged through the config logger and returned as null, like the flag code.
Where: a new method on the internal PostHogApi, next to localEvaluation.
No existing option covers this. remoteConfig in PostHogConfig is a deprecated no-op, and PostHogApi.remoteConfig() calls the client /config endpoint.
Questions:
Are the name and signature right?
With no personal API key, should it log and return null (Python) or throw (Node.js)?
Should API errors reach the caller? null also means "no payload".
Hey @Miguel-Shinyenyi, thanks for writing this up, the shape matches what I landed on. I'm working on it now in #978 (still a draft), so no need to pick it up.
On your third question, errors would be logged and come back as null. A failed request, a non-2xx status and a body that isn't valid JSON each log a warning. A flag with no payload returns null with no warning, so the log is how you tell the two apart. Let me know if this would be a problem for your use case?
Just a suggestion, maybe nice to have,
I think it might be good to have an addtional configuration option for remote config intervals which indepently from default polling 30s.
Since remote config are something less frequently changed. Is that possible to have independent polling interval config
for the remote config option?
So I can set interval for config polling maybe every 5min. And keep user specific feature flag as default polling 30 seconds
Activity
marandaneto commentedon Jun 16, 2026
this is about the
getRemoteConfigPayloadmethod and not the /$token/config endpointMiguel-Shinyenyi commentedon Oct 14, 2026
Use case: a JVM backend reads the payload of a remote config flag (settings, or encrypted values that PostHog decrypts) without a user context. Node.js and Python have
getRemoteConfigPayload.posthog-serverhas nothing equivalent.evaluateFlags()andgetFeatureFlagPayload()both need a distinct id.Proposal, matching Node.js and Python:
GET /api/projects/@current/feature_flags/{key}/remote_config?token={projectToken}withAuthorization: Bearer {personalApiKey}. Node.js and Python send the same request.personalApiKeyinPostHogConfig, the one local evaluation uses. No new option.null.null, like the flag code.PostHogApi, next tolocalEvaluation.No existing option covers this.
remoteConfiginPostHogConfigis a deprecated no-op, andPostHogApi.remoteConfig()calls the client/configendpoint.Questions:
null(Python) or throw (Node.js)?nullalso means "no payload".I can implement this once you agree on the shape.
ioannisj commentedon Nov 13, 2026
Hey @Miguel-Shinyenyi, thanks for writing this up, the shape matches what I landed on. I'm working on it now in #978 (still a draft), so no need to pick it up.
On your third question, errors would be logged and come back as
null. A failed request, a non-2xx status and a body that isn't valid JSON each log a warning. A flag with no payload returnsnullwith no warning, so the log is how you tell the two apart. Let me know if this would be a problem for your use case?huchenhai commentedon Nov 13, 2026
Just a suggestion, maybe nice to have,
I think it might be good to have an addtional configuration option for remote config intervals which indepently from default polling 30s.
Since remote config are something less frequently changed. Is that possible to have independent polling interval config
for the remote config option?
So I can set interval for config polling maybe every 5min. And keep user specific feature flag as default polling 30 seconds