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

321
Views
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 answers
Answer question

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 Report
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!