arenanet / api-cdi

Collaborative Development Initiative for Public APIs
252 stars 41 forks source link

/v2/guild/:id removes information when using an API token #647

Open armstnp opened 5 years ago

armstnp commented 5 years ago

When calling the /v2/guild/:id endpoint without an API token, you get external-facing information about the guild being requested: Name, Tag, Emblem.

When calling the /v2/guild/:id endpoint with an API token that has been granted access to the guild being requested, you get detailed information about the guild in addition: Level, MOTD, Aetherium levels, etc.

However, when calling the /v2/guild/:id endpoint with an API token that has not been granted access to the guild being requested, instead of returning to the basic information about the guild as one may expect, you're given a 403 Forbidden status code and no data.

This means I have to make two calls in order to get even basic info about most guilds if I'm attaching an API key to my requests by default. Can there be a compromise on this, for example an extension to the response that informs the caller whether the key has disallowed access or not?