mintapi: Automatic cookie retrieval for thx_guid fails
I am getting a “Mint.com login failed” error when get_session_cookies attempts to retrieve cookies automatically. I’ve traced it and the failure occurs in the last stage when trying to retrieve thx_guid from the https://pf.intuit.com URL.
ius_session appears to be retrieved correctly, and if I insert a couple of time.sleep() calls in the flow I see the regular Mint UI show up correctly so the initial auto-login process is working. However when retrieving the pf.intuit.com URL with ius_session as a parameter, the resulting page does not seem to include the thx_guid cookie (at least as far as I can tell when I try to go to the page using Chrome myself and then inspecting cookies using dev tools).
Any suggestions for how to diagnose further?
About this issue
- Original URL
- State: closed
- Created 7 years ago
- Comments: 24 (16 by maintainers)
The more I’ve been thinking about this problem, the more it seems like we’re fighting the wrong battle. To make this tool work, we have to make assumptions about how mint is handling their authentication. What I propose instead is making all data requests in the context of the selenium driver. I wrote a native version of pulling the transaction data from just the driver in the Ruby app I was integrating this tool into and everything works great. I imagine the same could be true for the other data sources as well. This library seems to solve the problem of not being able to make POST requests from selenium as well. https://pypi.python.org/pypi/selenium-requests/
Just to isolate any idiosyncrasies, I pulled down
jprouty:masterclean and my results are mostly consistent with above. Transactions consistently return the error specified above but accounts has occasionally returned results. I can’t figure out what the differentiator is between a populated response and anullresponse.