I'm getting a user's inbox via /me/inbox. I am forced to specify a site with this, so I'm setting it to Stack Overflow. However, it still gets all my notifications, including those from other sites. What is the point of having to specify a site if it makes no difference in the results?
1 Answer
You should use /inbox instead, which is a network route instead of a site-specific one. As mentioned in the documentation, the site-specific route is mostly just provided for convenience of consumers working in a single-site context.
Even then it doesn't seem particularly useful, but meh. To answer your question in regards to why site is required there, it's because /me routes just substitute in the authed user ID for the request's user ID parameter, and that requires a site (since it's not the global account ID). This makes more sense for the other /me routes than it does this one, of course.
5 Comments
/me/* routes do not require a site parameter. (/me/associated and /me/merges, for example)/inbox's functionality. I don't think there's a good reason for the route to exist in the first place, but the behaviour is at least intentional./me routes in both categories. ... Also, the /me routes that take site need to document why in cases like this. The only helpful clues are not on the applicable doc page.site don't get an error trying to invoke the network-based /inbox, which rejects that parameter. Laziness is literally the only purpose for this route, and people should always use /inbox.