mixpanel / mixpanel-ruby

Other
172 stars 72 forks source link

What API key to use with import? #113

Open DataGreed opened 5 years ago

DataGreed commented 5 years ago

Why exactly does import method take API key and track method does not?

Is it the same API key or different? Where do I get it? The HTTP docs does not say anything about a separate key - https://developer.mixpanel.com/docs/importing-old-events

enague commented 2 years ago

Hi there!

I wrote a response similar to this issue here: https://github.com/mixpanel/mixpanel-ruby/issues/106#issuecomment-1027346858

Hi everyone!

Eric from Mixpanel Support here, and I'm sorry about the confusion.

I tested this out on my own, and I'd like to suggest a quick troubleshooting method. Essentially, in the Mixpanel Ruby library, both the track method and profile update method are using the project token to authenticate, and as far as I know, the import method is the only method using both token and API key to authenticate.

Note: you can see when to use /track or /import here: https://developer.mixpanel.com/reference/track-event#when-to-use-track-vs-import

Therefore, I would double check that you are using the API Key (NOT THE API SECRET) in your requests. This can be found in your personal settings as described here: https://help.mixpanel.com/hc/en-us/articles/360000953003#accessing-personal-settings

I hope that helps, and sorry again for the inconvenience or confusion here.

yokeshchronus commented 1 year ago

Hi there!

I wrote a response similar to this issue here: #106 (comment)

Hi everyone! Eric from Mixpanel Support here, and I'm sorry about the confusion. I tested this out on my own, and I'd like to suggest a quick troubleshooting method. Essentially, in the Mixpanel Ruby library, both the track method and profile update method are using the project token to authenticate, and as far as I know, the import method is the only method using both token and API key to authenticate. Note: you can see when to use /track or /import here: https://developer.mixpanel.com/reference/track-event#when-to-use-track-vs-import Therefore, I would double check that you are using the API Key (NOT THE API SECRET) in your requests. This can be found in your personal settings as described here: https://help.mixpanel.com/hc/en-us/articles/360000953003#accessing-personal-settings I hope that helps, and sorry again for the inconvenience or confusion here.

Hey I'm not able to see the quoted article now! Also there is nothing called api key in settings, all we got is api secret and when used , the events are not getting imported ! Is there any workaround for the same?