7

I'm reading the Authentication documentation and I've noticed that the /me/associated route returns fields like user_id, badges, reputation but not the display_name, even specifying a custom Filter.

Once I get via Oauth2.0 the access_token, the first thing I would do is to get the list of accounts of the user; without the display_name in the /me/associated route, I'm forced to make another call to the /me route for each associated site, passing the site parameter on the query string .

Is this by design?
Can we have the display_name field in the /me/associated route to save some API calls?

2
  • 1
    Really it should return the full user object, and just allow you to select which fields you want using filters.
    – Jonathan.
    May 22, 2012 at 11:39
  • 1
    I wonder if Kevin doesn't reply because he doesn't see them (there's been a lot of Off Topic questions lately), it would be nice to be able to @ping him, from anywhere.
    – Jonathan.
    May 23, 2012 at 19:00

1 Answer 1

1
+50

This is by design, for reasons of technical limitations.

Unfortunately, we don't have easy access to display names at a "network level". What's available (and what's backing the API) is very normalized, often somewhat delayed, data.

As a rule, only very small bits of data are pulled into global tables; as it all has to reside in a single database. Generally this means no strings, like display names (or about mes, or locations, so on).

I realize this isn't ideal, but it's the world we're in until some non-trivial upgrades in our infrastructure. Some of the necessary work is already being undertaken, but not all of it is in sight; I can't really promise changes for any particular API release.

What I suggest doing (and what the network itself does) is picking a way to choose a "primary user" and just fetching that one. We use oldest account (backed by creation_date on network_user), though in the past we have also used highest reputation. Either approach has its merits.

1
  • I see, but can't this be marked as status-deferred? Maybe in the future, after the infrastructure upgrade, this will be easier to implement and provide; after all this feature will save you from a /me bomb calls for each site returned from the /me/associated route. May 30, 2012 at 7:02

You must log in to answer this question.

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