mixpanel / mixpanel-node

A node.js API for mixpanel
http://www.mixpanel.com
MIT License
476 stars 161 forks source link

service account support #188

Open mfulton26 opened 3 years ago

mfulton26 commented 3 years ago

I'm looking to update my remote service workers to use a Mixpanel service account

https://developer.mixpanel.com/reference/authentication

it does not look like this library supports such yet; can that be added?

i.e. to send a username and password via HTTP Basic Auth

thank you

tdumitrescu commented 3 years ago

For purposes of normal event-tracking (i.e. via Mixpanel's /track API endpoint), the publishable Project Token is still the only auth method.

The /import endpoint does support service accounts now, and we'll look into getting that added to this SDK, but just know that it won't be sufficient for now if you're trying to call mixpanel.track().

austinpray-mixpanel commented 4 months ago

Ran into this when trying to use /import api: https://developer.mixpanel.com/reference/import-events#authentication

/import requires an Owner or Admin Service Account. project_id, service account username and service account password are required to authenticate a request.