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
via testinggnitset ser
No comments:
Post a Comment