API%3APublic_Stashes

Old: ChuanHsing 2023-01-24 12:40:48

New: ChuanHsing 2023-01-24 12:41:40

OldNewDifferences
1-# POESESSID
1+## Public stash API
22
3-**[Do not share POESESSID values with other people](https://www.pathofexile.com/forum/view-thread/3328601)**
3+Before accessing this API, you need to apply the official OAuth form and require scope: `service:psapi`.
44
5-One works with http cookie header, that used by official site. You can use Chrome browser in Dev Tool (Press F12), click the `Network` tab, click `Fetch/XHR` filter to see how the API used. But note that this api is not officially supported and no documentation.
5+[Public stash API](https://www.pathofexile.com/developer/docs/reference#publicstashes) doesn't contain any historical data and always returns the current state of stash tabs. Using ajax from a browser got blocked by CORS, you need to setup a basic proxy to fetch it.
66
7-### Find the POESESSID in Chrome or Edge
7+Every request will return a `next_change_id` and put it on next `id=` parameter. You will fetch the Json by sequence, for example
8+```
9+http://www.pathofexile.com/api/public-stash-tabs
10+http://www.pathofexile.com/api/public-stash-tabs?id=342209785-336957592-338826328
11+http://www.pathofexile.com/api/public-stash-tabs?id=342209792-336957596-338826330
12+http://www.pathofexile.com/api/public-stash-tabs?id=342209797-336957599-338826336
13+```
814
9-**Strongly recommend extreme caution with the use of your POESESSID, as providing that information to anyone else may put your account access at risk.**
15+Using deflate parameter in request header will save a lot of traffic.
1016
11-* Login to pathofexile.com
12-* Press F12 to open the Dev Tool
13-* Click the Application tab
14-* Expand the Cookies dropdown and select pathofexile.com
15-* Double click the POESESSID Value and copy
17+### Rate Limit
1618
17-![](https://i.imgur.com/dqTO88O.png)
19+Be aware there is a [rate limit](https://www.pathofexile.com/forum/view-thread/2079853#p15244273).
20+
21+```
22+curl -XGET -s -D - http://www.pathofexile.com/api/public-stash-tabs | grep -i 'x-rate-limit'
23+```
24+
25+### Next change id
26+
27+You can get latest change id at https://poe.ninja/stats