The main purpose of the Iris.subscribe() is to send a point to the instagram server from where events should be replayed. It is useful if the connection was lost for a while but you want to replay all the events fired in period you was disconnected. To achieve it you need to cache seq_id - it's the sequential number indicating the point of the last handled event.

For example - you handled event with seq_id 1. Then you disconnected ror some reason for a 5 seconds and your friend wrote you 3 messages. If after reconnecting you will subscribe using seq_id from DM http request - you wont get these messages. Because DM http request always returns the current seq_id. But if you cache seq_id 1 and send it instead of the http-fetched seq_id - instagram server will replay these 3 messages for you.

Empirically, it was found out you can't send seq_id that is more than ≈115 points behind the current one. Otherwise instagram will response with IrisQueueOverflowException


  • Iris



#payload: null | IrisPayloadStrategy = null
subscriptionManager: SubscriptionManager


  • Returns boolean