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

320
Vistas
Instagram Subscription API get response hub.challenge

I'm reading the Instagram API docs https://www.instagram.com/developer/subscriptions/

And I understand the necessary steps

but on this line

In order to verify the subscription, your server must 
respond to the GET request with the hub.challenge parameter only:

After Instagram sends a POST request to my callback, when they state "server must respond to GET request" does that mean when they call my GET callback, I instantly send a post request within the GET callback. Inside this post request I send the hub.challenge to " https://api.instagram.com/v1/subscriptions/"

so something like

getInstagramSubscription(req,res){
     //Grab hub.challenge and send post request to https://api.instagram.com/v1/subscriptions/

},

I tried using instagram-node-lib

 getInstagramSubscription(req,res){

     var handshake =  Instagram.subscriptions.handshake(req, res);

},

but once I deploy on heroku with this curl request

 curl -F 'client_id=client_id' \
 -F 'client_secret=secret' \
 -F 'object=username' \
 -F 'aspect=media' \
 -F 'verify_token=myVerifyToken' \
 -F 'callback_url=callback_url/subscriptions' \
 https://api.instagram.com/v1/subscriptions/

I'm still getting a Challenge verification failed

over 4 years ago · Santiago Trujillo
1 Respuestas
Responde la pregunta

0

Nevermind, so apparently you just respond with with the hub.challenge like so

    getInstagramSubscription(req,res){
     console.log(req.query)
     //Just send back the hub.challenge 
     return res.send(req.query['hub.challenge']);
}

I also had a couple errors with correct callback url

over 4 years ago · Santiago Trujillo 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