mixpanel-ruby icon indicating copy to clipboard operation
mixpanel-ruby copied to clipboard

What API key to use with import?

Open DataGreed opened this issue 6 years ago • 3 comments

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

DataGreed avatar Aug 12 '19 21:08 DataGreed

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.

enague avatar Feb 01 '22 23:02 enague

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?

yokeshchronus avatar Jul 04 '23 08:07 yokeshchronus