Closed ogrady closed 4 years ago
Manually visiting the provided URL leads to a 404 Not Found:
{ text: "no such guild" }
Using a different Guild does not require authentication: https://api.guildwars2.com/v2/guild/6FF265DD-8D8C-E911-81A8-E944283D67C1
Based on the wiki https://wiki.guildwars2.com/wiki/API:2/guild/:id Authentication is optional:
The end point will include more or less fields dependend on whether or not an API Key of a Leader or Member of the Guild with the guilds scope is included in the Request.
Maybe some user key is accidentially used to make the request, that was left in the gw2api package ?
It looks like https://pypi.org/project/gw2api/ is not thread safe. The api key is a shared static variable.
It's probably worth taking a look at https://pypi.org/project/GuildWars2-API-Client/ as it uses instantiation for creating a client.
Manually visiting the provided URL leads to a 404 Not Found:
{ text: "no such guild" }
Using a different Guild does not require authentication: https://api.guildwars2.com/v2/guild/6FF265DD-8D8C-E911-81A8-E944283D67C1
Sorry, I had taken the liberty to remove some characters from the ID in the error message in an overzealous attempt to not disclose any "personal" information. The link still works fine with the proper ID, so it's not an issue specific for the guild or the user.
For this particular job, we don't really need a wrapper, as it is an unauthenticated endpoint with JSON contents, so we could also fall back to a low-tech approach instead of swapping out an entire dependency: https://repl.it/repls/ActualGenuineParticles
I don't like the idea of having 2 ways of talking to the same api. The underlying issue of api key bleeding between concurrent requests is still there.
PR #36 adresses this issue.
I am still not sure if concurrent requests really are an issue here, since the failing delete request could be reproduced repeatedly, while seemingly no other requests, like authentifcations, were going on. Were you able to reproduce the behaviour locally and is it consequently fixed in #36 ?
Closed by #36
Deleting the guild using the command yields:
While calling the URL in the error from a browser works fine.