Empresas
Empleos
  • Sobre nosotros
  • Soluciones
    • Publicación de vacantes
      Publica tu vacante y recibe candidatos calificados en 48h.
    • Evaluación de candidatos
      500+ pruebas técnicas y psicológicas, más anti-fraude.
    • Headhunting
      Búsqueda ejecutiva a la medida de principio a fin.
    • Nómina + EOR
      Dispersión de nómina y EOR en más de 15 países de LATAM.
  • Precios
  • Empleos

0

232
Vistas
Making POST request to discord server in nodejs

I am trying to make a post request to the following endpoint:

`https://discord.com/api/v9/invites/${link}`

But, i keep getting the following response:

{
  captcha_key: [ 'captcha-required' ],
  captcha_sitekey: '4c672d35-0701-42b2-88c3-78380b0db560',
  captcha_service: 'hcaptcha'
}

What i am trying to do is to write a script where i can join a discord server from a provided discord server invite link.

Below is the function I am using to make a request.

const fetch_request = async (link, options) => {
  if (typeof link !== "string") throw new Error("Couldn't fetch");
  return new Promise((res, rej) => {
      fetch(`https://discord.com/api/v9/invites/${link}`, {
          headers: {
              "accept": "*/*",
              "accept-language": "en-US",
              "authorization": "<user_token_here>",
              "content-type": "application/json",
              "sec-fetch-dest": "empty",
              "sec-fetch-mode": "cors",
              "sec-fetch-site": "same-origin",
              "x-discord-locale": "en-US",
              "origin": "https://discord.com",
              referer: `https://discord.com/channels/@me`,
              mode: "cors",
          },
          body: JSON.stringify('{}'),
          method: 'POST'
              
        }).then((response) => {
          if (options.parse) {
              response.json().then((m) => {
                  res(m);
              });
          } else {
              res(response);
          }
      });
  });
}

The request seems to be made but, how do I bypass this capctha. I checked headers, they seem to be ok to me. How do I get the user to join a guild using discord api?

Thank you for help.

about 4 years ago · Juan Pablo Isaza
2 Respuestas
Responde la pregunta

0

You need to solve the captchas, i suggest you solving them with a service like 2captchas or other similar options, they are super cheap and usually don't take too long to setup.

about 4 years ago · Juan Pablo Isaza Denunciar

0

I was just trying the same thing as you, check out 2Captcha's API .

It's very cheap, all you need is to get "captcha_key" and add it to your request next time.

about 4 years ago · Juan Pablo Isaza Denunciar
Responde la pregunta
Encuentra empleos remotos

¡Descubre la nueva forma de encontrar empleo!

Top de empleos
Top categorías de empleo
Empresas
Publicar vacante Precios Comercial
Legal
Términos y condiciones Política de privacidad
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomiéndame algunas ofertas
Necesito ayuda