Repository navigation
docs(react-native): describe apiKey as the project token - #5221
Merged
Merged
Conversation
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
dustinbyrne
approved these changes
Oct 7, 2026
dustinbyrne
left a comment
Contributor
There was a problem hiding this comment.
The terminology clarification preserves the existing RN API and initialization behavior. Consider including the regenerated rolling RN reference; the current reference-check job fails on exactly the two updated descriptions.
AI-assisted review.
turnipdabeets
enabled auto-merge
October 7, 2026 15:35
github-merge-queue
Bot
removed this pull request from the merge queue due to failed status checks
Oct 7, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Problem
The RN
apiKey(thePostHogconstructor parameter and thePostHogProviderprop) is documented as "Your PostHog API key". It's actually the project token (phc_...). That's easy to confuse with a personal API key, and the other SDKs now call it a project token.Changes
This is docs only. The public API is unchanged, and
apiKeykeeps its name.PostHogconstructor@param apiKeyand thePostHogProviderapiKeyprop JSDoc now say it's the project token, starting withphc_, and link to the project settings page.console.errornow says "project token" instead of "project's api key". The two tests that assert the message are updated.The shared
@posthog/coremessage (posthog-core-stateless.ts:427, also used by node) is left unchanged to keep this PR to RN.Release info Sub-libraries affected
Libraries affected
Checklist
If releasing new changes
pnpm changesetto generate a changeset file🤖 Agent context
Autonomy: Human-driven (agent-assisted)
apiKeyas the project token instead of renaming it in JS. The wording matches the posthog-android KDoc (feat: add projectToken and deprecate apiKey posthog-android#835).vitest run test/posthog.spec.ts test/PostHogProvider.spec.tspassed (156 tests), andoxfmt --checkis clean on the changed files.🤖 Generated with Claude Code