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

60
Vistas
Slack bot send an image by Amazon S3

I'm building a slackbot which takes images from the Amazon S3 bucket and posts it to a slack channel. I made sure that the Amazon S3 bucket is public. Here's my code :


 const slackToken = SLACK_TOKEN;
 const url = 'https://slack.com/api/chat.postMessage';
 const res =  await axios.post(url, {
   channel: '#general',
   blocks: [
   
     {
       type: 'image',
       image_url: AWS_S3_BUCKET_URL,
       alt_text: 'qrcode'
     }
     
   ],
   username: 'SlackBot',
 }, { headers: { authorization: `Bearer ${slackToken}` } });

 console.log('Done', res.data);

But it gives me this wierd error

  ok: false,
  error: 'invalid_blocks',
  errors: [ 'downloading image failed [json-pointer:/blocks/0/image_url]' ],
  response_metadata: {
    messages: [
      '[ERROR] downloading image failed [json-pointer:/blocks/0/image_url]'
    ]
  }
}

When I replace the AWS_S3BUCKET_URL with any other url like https://mms.businesswire.com/media/20200513005022/en/791013/22/AWS_logo_RGB.jpg It works fine, But gives error in case of AWS_S3_BUCKET_URL.

about 4 years ago · Juan Pablo Isaza
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