3

I have been trying to find the API for getting all the pinned/favorite sites of the user, but I can't.

3
  • @Glorfindel Yes, the newest version is site now. Please show m how to get them ? Commented Apr 29, 2020 at 19:53
  • @Glorfindel What do you mean " mobile app has that info " ? It also has on the web and when the 2.3 version will be released? Commented Apr 29, 2020 at 20:00
  • Not everything that is available on the web is exposed via the API, probably less than half of it.
    – Glorfindel
    Commented Apr 29, 2020 at 20:29

1 Answer 1

3

This information is not available in the officially released version of the API (2.2) and you won't find it in the documentation.

However, the Stack Exchange mobile apps have some 'special' API methods, hosted under https://mobile.stackexchange.com, which do expose this information. That's why you're able to see (and maintain) this list from the apps. They are no longer in development but still work.

I just tried a GET call to the following URL: https://mobile.stackexchange.com/1/preferences/get-pinned-sites?filter=fLdr8Pr0.&access_token=[ACCESS_TOKEN]&key=[APPLICATION_KEY] and got the following result:

[
  {"site":{"api_site_parameter":"meta"},"position":0},
  {"site":{"api_site_parameter":"boardgames"},"position":1},
  {"site":{"api_site_parameter":"puzzling"},"position":2}
  ...
]

which is indeed the list of my currently pinned sites. However, this method only works if you use an access token and key of one of the official Stack Exchange mobile apps, which you can discover with a tool like mitmproxy. That means you can basically forget about enabling this functionality for an arbitrary user using your app.

1
  • Thanks for your information. I hope it will available soon in the next release Commented Apr 29, 2020 at 20:43

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .