Instagram unsubscribed from the tag, and when the re-subscription disappeared even with a successful response

I launch the application using the Instagram RealTime API, and when I subscribe to the tag, everything works fine initially, I see for sure that the response time within 100 ms returns to instagram, but after about an hour and a half hours they accidentally delete my subscription to tags . I check and I am not limited by the bid, so I set up something to check my subscriptions every 10 minutes, and if the tag that I subscribed to does not return from instagram to re-subscribe. On startup, I return the response to which it is subscribed -

{ object: 'tag',
  object_id: '...',
  aspect: 'media',
  callback_url: 'http://...',
  type: 'subscription',
  id: '4479168' }

but then when I check my subscriptions again using the API Console, it shows that there are no subscriptions.

Does anyone know why Instagram automatically deletes my subscription.

+4
source share
2 answers

Have you confirmed / confirmed your subscription? You did not mention this in your question, so it makes me think that maybe he will choose the time after not being confirmed?

According to the API docs POST , for any subscription to activate GETfor yours callback_url, which will include:

  • hub.mode - the value will be set to "subscribe"
  • hub.challenge - a random line will be selected for this line in which your return URL will have to respond in order to confirm that you want to subscribe.
  • hub.verify_token - , _ .

URL:

http://your-callback.com/url/?hub.mode=subscribe&hub.challenge=15f7d1a91c1f40f8a748fd134752feb3&hub.verify_token=myVerifyToken

, hub.challenge, .

+2

, , Instagram , . , 8 IP- ( HTTP-), , -, . , (100 ), Instagram .

, .

+1

Source: https://habr.com/ru/post/1533755/


All Articles