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
Service account credentials are only used for the `/import` endpoint and feature flags. Regular event tracking operations (`track`, `people_set`, `group_set`) use the token provided in the constructor, which is sent in the event payload.
@@ -97,20 +97,20 @@ from mixpanel import Mixpanel, ServiceAccountCredentials
97
97
from mixpanel.flags.types import LocalFlagsConfig
98
98
99
99
credentials = ServiceAccountCredentials(
100
-
username='YOUR_SERVICE_ACCOUNT_USERNAME',
101
-
secret='YOUR_SERVICE_ACCOUNT_SECRET',
102
-
project_id='YOUR_PROJECT_ID'
100
+
username="YOUR_SERVICE_ACCOUNT_USERNAME",
101
+
secret="YOUR_SERVICE_ACCOUNT_SECRET",
102
+
project_id="YOUR_PROJECT_ID",
103
103
)
104
104
105
105
# Token identifies the project for event tracking, credentials handle authentication
**Note**: When using service account credentials, the `token` parameter in the `Mixpanel` constructor is still required for event tracking operations (`track`, `people_set`, etc.) since the token is included in the event data payload. However, feature flag operations use the `project_id` from credentials instead of the token for authentication.
0 commit comments