user pass cookie;
Because of an update to the authorization flow of Mint.com, the API now
requires a couple cookies, which are passed to the pepper-mint library as
a string. These are called
To get the value of these cookies, you can use Chrome and login to Mint.com,
then open the Developer Tools and check the Application tab. On the left
should be an item called Cookies, which you can expand to see
https://pf.intuit.com, at least.
can be found on the former, and
thx_guid can be found on the latter.
You can pass these separately as:
username password ius_session thx_guid
or as a cookie-style string (for backwards compatibility):
Furthermore, if you don't want to extract them by hand at all, pepper-mint
includes a mechanism to drive a Chrome browser and extract it automatically---just
be aware that using this method will probably require you to input a two-factor
auth code. If you want to persist the cookies fetched by this method, they will
be stored as
.sessionCookies on the Mint instance:
Everything returns a promise for convenient chaining (and also because I wanted to try it out).
Returns a Login function, which accepts a mint.com username and password as its arguments, and returns a Promise which, when resolved, passes a PepperMint API object. All methods below are called on that object, and return a Promise. In this context, "returns" is a shorthand to mean "the promise resolves with."
Returns an array of Accounts.
Returns a list of Categories (for categorizing transactions)
Returns a list of user-defined Tags
Returns a list of Transactions, optionally filtered by account and/or offset.
args is an optional dictionary, with keys
Create a new cash transaction.
NB: There is currently very little arg validation, and the server seems to silently reject issues, too :(
Args should look like:
accountId: 1234 // apparently ignored, but good to have, I guess?amount: 42category:id: idname: namedate: "MM/DD/YYYY"isExpense: boolisInvestment: boolmerchant: "Merchant Name"note: "Note, if any"tags: 1234 5678 // set of ids
category is Optional; if not provided, will just show
up as UNCATEGORIZED, it seems
Delete a transaction by its ID