I can't get a response from the API,or I'm doing it very bad

Hello! First of all, thank you for opening my thread and I apologize for being rude in coming here without knowledge. I also apologize if there is any mistake since I use Google Translate.

I came here because I was looking for relevant information and I couldn’t find it anywhere. And since I couldn’t find what I was looking for, I decided to venture into this world. I don’t know anything about programming, absolutely nothing, and I’m using GPT chat (so far I’ve managed to put online what I’m trying to do haha, but nothing is worse)

The problem: I’m trying to search for an existing character in my guild, but it doesn’t find it. The command prompt code line tells me a 404 error and as far as I could find out it corresponds to an error when getting a response from the API.

Realizando solicitud a URL: h ttps://us.api.blizzard.com/data/wow/guild/linaje-de-honor/roster con parámetros: {‘namespace’: ‘profile-us’, ‘locale’: ‘es_MX’}
Error en la solicitud a Blizzard: 404, Respuesta: {“code”:404,“type”:“BLZWEBAPI00000404”,“detail”:“Not Found”}
No se pudieron obtener miembros de la hermandad. (Separate the h so it doesn’t take it as a link)

What am I trying to do? I’m trying to create a discord bot that communicates with blizzard and returns information to me

  • Character name
  • Assign role if the character belongs to the guild
  • Change the nickname on discord to the character’s name
  • If the character does not belong to the guild, create a ticket channel mentioning the user and officers to attend to the request and incorporate it into the game to the guild.
  • A channel that tells me who enters and who leaves the guild

As I mentioned above, I’m having problems almost at the beginning. The bot tells me that the character does not exist in the guild and creates the channel with the ticket. And the character does exist.

The line of code I am using is this:

nombre_hermandad_codificado = quote(HERMANDAD_NOMBRE.lower())  
url = f'https://{REGION}.api.blizzard.com{endpoint.format(nombre_hermandad_codificado)}'  


print(f"Realizando solicitud a URL: {url} con parámetros: {params}"

Again, thank you very much for reading, and please forgive my ignorance and audacity in asking for help.

I’m in the EXACT same boat. I’m getting 404 errors and cannot figure out what’s happening.

The endpoint you are trying to call

https://us.api.blizzard.com/data/wow/guild/linaje-de-honor/roster

is completely wrong. Guild is a profile and not a data endpoint, also you are not providing the the realm slug as part of the URI.

Please refer to the official documentation for more information about the available endpoints.