Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

170
Views
¿Cómo obtengo los datos del rol de discordia de un gremio usando una llamada API?

tengo este código en JS, sin embargo, siempre devuelve un error 403 cuando lo ejecuto en mi sitio web. Intenté ejecutar la misma solicitud con python y en cartero y me dio los datos que quería, por lo que la API definitivamente no es el problema. también me dio un error de CORS que resolví obteniendo una extensión de Chrome, pero no estoy seguro de si ese es el problema

 const url="https://discord.com/api/v9/guilds/792895591255769098/members/search" function callAPI() { var xhttp = new XMLHttpRequest(); xhttp.open('GET', url); xhttp.setRequestHeader('Authorization', 'Bot <my bots token>'); xhttp.send(); console.log("sent request") console.log(xhttp) } callAPI.call()

También probé este código pero devuelve el mismo resultado.

 async function getGuildRoles(){ const response = await fetch('https://discord.com/api/guilds/792895591255769098/members',{ method:'GET', headers: { Authorization: 'Bot <my bots token>' } }); console.log(response.text()); return response; } getGuildRoles.call()
about 4 years ago · Juan Pablo Isaza
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!