cooncesean / mixpanel-query-py

The Python interface to fetch data from Mixpanel.
MIT License
29 stars 17 forks source link

Updated Auth to use basic authentication #29

Closed drathm closed 7 years ago

drathm commented 7 years ago

Master appears to be broken by mixpanel now with the depreciation. I'm using @robin900 auth branch and fixed a small import and auth string bug

cooncesean commented 7 years ago

@drathm can you provide a link to what Mixpanel changed w/ regards to their API?

@thesmallestduck we are currently using this in production; have we noticed any errors lately with regards to fetching data from Mixpanel using the existing version of master of this lib?

drathm commented 7 years ago

I can't find any reference to changes, but here is the auth documentation which refers to basic auth. My client was returning a 400 before applying @robin900 change.

https://mixpanel.com/help/reference/jql/api-reference#api/access

robin900 commented 7 years ago

@drathm I wonder: if you change Connection.ENDPOINT to be 'https://mixpanel.com/api', will the use of HTTPS will cause the old authentication approach to be successful, without these changes?

I still support switching to use the new basic auth scheme exclusively, since it works against all endpoints and isn't subject to future deprecation.

thesmallestduck commented 7 years ago

I am not against using the documented authentication method, despite it feeling like a step backwards to me. I will note we currently use master on our production deployment and are not having trouble with our authed calls. I suppose it is possible our project has been grandfathered into old auth methods while new projects are not supported. The last time we discussed this mixpanel stated they had no plans to deprecate the old method of authentication.

Maybe @jaredmixpanel can weigh in again, and these plans have changed?

thesmallestduck commented 7 years ago

Or perhaps it is their new JQL product feature that does not support the old auth method, we use the segmentation API predominantly.

jaredmixpanel commented 7 years ago

@thesmallestduck to my knowledge nothing has changed since we last discussed this. @drathm feel free to write into support@mixpanel.com with the details of the failing API calls and we can take a closer look.

thesmallestduck commented 7 years ago

@drathm I've attempted to add support for this means of authentication (while maintaining signature-based authentication) here: https://github.com/cooncesean/mixpanel-query-py/issues/30

When you get a chance would you mind verifying it works for you? I appreciate your PR here, and I am hopeful that we can both maintain the existing signature-based authentication and support the new authentication method.

frifri commented 7 years ago

Thanks for this PR @drathm but I think I will be Closing it in favor of #30 if that's okay with you?