AppsFlyer source rejects valid credentials due to invalid dailyreport endpoint
Nobody has claimed this yet.
- Dominant language
- Python
- Stars
- 39.9k
- Forks
- 3.4k
- Avg merge
- 6h 51m
- Merged PRs (30d)
- 232
Description
Bug Description
The AppsFlyer data warehouse source rejects valid AppsFlyer credentials with:
Invalid AppsFlyer API token or app id
The credentials are valid. The backend validation appears to call an invalid AppsFlyer aggregate report endpoint.
PostHog appears to call:
/api/agg-data/export/app/{app_id}/dailyreport/v5
AppsFlyer returns:
400 Invalid query: Unknown report type: dailyreport
The valid endpoint is:
/api/agg-data/export/app/{app_id}/daily_report/v5
With the same app ID and token, these AppsFlyer endpoints return HTTP 200 directly:
daily_report/v5geo_by_date_report/v5partners_by_date_report/v5
This blocks creating the AppsFlyer data warehouse source in PostHog Cloud.
How to reproduce
- Go to Data warehouse > New source > AppsFlyer.
- Enter a valid AppsFlyer API token V2 and a valid iOS app ID, e.g.
id.... - Click Next.
Expected: PostHog validates the credentials and proceeds to table selection.
Actual: PostHog returns Invalid AppsFlyer API token or app id.
Additional context
Relevant code in the current PostHog repo:
posthog/temporal/data_imports/sources/appsflyer/appsflyer.py
f"{APPSFLYER_BASE_URL}/api/agg-data/export/app/{quote(app)}/dailyreport/v5"
This should likely be:
f"{APPSFLYER_BASE_URL}/api/agg-data/export/app/{quote(app)}/daily_report/v5"
Also in:
posthog/temporal/data_imports/sources/appsflyer/settings.py
"daily_report": AppsFlyerEndpointConfig(
name="daily_report",
report="dailyreport",
),
This should likely use:
report="daily_report"
Debug info
- [x] PostHog Cloud, Debug information: [redacted]
- [ ] PostHog Hobby self-hosted with `docker compose`, version/commit: [please provide]
- [ ] PostHog self-hosted with Kubernetes (deprecated, see [`Sunsetting Kubernetes support`](https://posthog.com/blog/sunsetting-helm-support-posthog)), version/commit: [please provide]
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with posthog/temporal/data_imports/sources/appsflyer/appsflyer.py and settings.py, focusing on the daily report endpoint and its AppsFlyerEndpointConfig. Verify the endpoint and report name against the valid AppsFlyer paths described in the issue. Done means valid credentials pass backend validation and the AppsFlyer source proceeds to table selection.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python
- Domain
- data-engineering
- Issue type
- Bug
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Activity status
- Quiet
- Clarity
- Clearly specified
- Newbie friendliness
- 86/100