3

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 1

3

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
  • The more I look into this, the more it seems it's a bug. and other /me/* routes do not require a site parameter. (/me/associated and /me/merges, for example) Feb 17, 2016 at 21:13
  • Those are network routes, though. This exists explicitly as a site-specific route that duplicates /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.
    – Tim Stone
    Feb 17, 2016 at 21:19
  • This is a network route that is improperly treated as a site-specific route for no good reason that I can see (inbox is network-wide). Especially since we have /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. Feb 17, 2016 at 21:22
  • The only reason the route exists is so that applications which always append 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.
    – Tim Stone
    Feb 17, 2016 at 21:28
  • Totally hijacking this comment thread, but I'm not aware of any other way to get a hold of a mod; @TimStone any chance I could get you to send me a "moderator message"? I'm trying to test all types of notifications (each uses its own icon, etc.) in my app.
    – RareNCool
    Feb 9, 2017 at 13:52

You must log in to answer this question.

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