Empresas
Empregos
  • Sobre nós
  • Soluções
    • Publicação de vagas
      Publique sua vaga e receba candidatos qualificados em 48h.
    • Avaliações de candidatos
      Mais de 500 testes técnicos e psicológicos, mais anti-fraude.
    • Headhunting
      Busca executiva personalizada do início ao fim.
    • Folha de Pagamento + EOR
      Dispersão de folha e EOR em mais de 15 países da LATAM.
  • Preços
  • Empregos

0

318
Visualizações
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 Respostas
Responde à pergunta

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 Relatório
Responde à pergunta
Encontrar trabalhos remotos

Descubra a nova forma de encontrar um emprego!

melhores empregos
Principais categorias de trabalho
Empresas
Postar vaga Preços Comercial
Jurídico
Termos e Condições Política de privacidade
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomende algumas ofertas para mim
Preciso de ajuda