AppsFlyer source rejects valid credentials due to invalid dailyreport endpoint
Nobody has claimed this yet.
Assessment
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Newbie friendliness
- 86/100
- Issue type
- Bug
- Clarity
- Clearly specified
- Activity status
- Quiet
- Tech stack
- python
- Domain
- data-engineering
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.
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]
- Dominant language
- Python
- Stars
- 39.9k
- Forks
- 3.4k
- Avg merge
- 10h 19m
- Merged PRs (30d)
- 203
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.
More from PostHog/posthog
-
Difficulty 2/5 1-3 hours Newbie friendliness 74/100
-
MotherDuck incremental sync never checks for duplicate primary keys, so the guard is a dead branch Openbug
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
-
bug
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
-
ai-observability bug team/ai-observability
Difficulty 2/5 1-3 hours Newbie friendliness 84/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 84/100
Similar issues
-
Difficulty 2/5 1-3 hours Newbie friendliness 88/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 82/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
-
enhancement
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 74/100