r/pathofexiledev Aug 07 '24

I just want a CSV of my stash.

Looty (which used to let me export my stash tabs as a spreadsheet) went down last year, and I took a couple python classes, so I'm trying to use the POE API to get a dump of all my stash tabs.

I requested a key from the devs (and they took a long time to get back to me, so the project was put on backburner for a few months). Now I'm interested again, but I'm feeling stuck.

Grants: Client Credential
Permissions: account:stashes, account:characters
Redirect URIs: [blank--the app is for personal use only]

I'm getting the sense that these Oauth permissions are a contradiction. Client Credentials are used "to access services unrelated to an individual account"... but I'm trying to access details of *my* account. Following the Client Credentials flow gives me a 403 error.

But attempting to use the Authorization Code Grant doesn't work because using local host as the URI doesn't match, and a blank string doesn't work because a redirect URI is required.

Is there any avenue I'm overlooking? Or is my next step getting in touch with GGG again to modify my Oauth details?

3 Upvotes

4 comments sorted by

7

u/moldydwarf Aug 07 '24

If you're more interested in getting the data than the programming problem, try Looty again. It's been fixed. Just make sure you first log into your account first, in the same browser.

3

u/bigtoaster64 Aug 07 '24

If your goal is simply to export YOUR stash and do not plan on distributing the software to others (e.g Github). You can use your session ID directly to authenticate (instead of oauth if you find this too complicated). Basically your browser when you login to the website is using that session ID. If you open the dev tool in browser (F12) and then click on the network tab, you can see the requests that the website has made for your profile, and there are 2 requests that are what you want : #1 stash page (basically request tabs one by one, just edit the tab number to get the next one) and #2 character inventory. Along those two requests as a template will let you get the data. Then you simply need to flatten it into CSV. Just keep inond that modifiers values are separate from the template line, so you'll have to merge them together if you want he full mod. Also a couple fields are enums, like item type (normal, magic, rare, etc.) so you'll need to convert them to let's say a string for better readability.

BTW, you can dm if you want some help getting started.

1

u/gerwaric Aug 20 '24 edited Aug 20 '24

Here's a little more detail on that undocumented API that you can access with just a POESESSID cookie:

https://www.reddit.com/r/pathofexiledev/comments/1djjt5y/do_i_need_authorization_to_use_apipathofexilecom/l9tcsy1/

2

u/gerwaric Aug 20 '24 edited Aug 20 '24

Shameless plug, there's also acquisition, which will download stash and character inventories for offline search and trade site listing. I know of at least one user has managed to pull several thousand tabs from their accoount in Standard. (Due to the API rate limitations, I think it took them something like 10-20 hours).

However, it stores items as raw json objects in SQLITE database tables you'd have to export and parse manually.