Instagram logging out after each post request

macdonjo3

Elite Member
Jr. VIP
Joined
Nov 8, 2009
Messages
8,887
Reaction score
9,192
This section lacks topics of depth beyond "what language should I learn" but every time I post here I've always been lucky enough to find someone who knows exactly what I'm talking about.

Talking about sniffing the IG API...

So if I authenticate and post a request, say I send a message or a like or anything... it works but then if I do an additional request, it logs out meaning I get the following reply on the next POST request.

{u'logout_reason': 2, u'status': u'fail', u'message': u'login_required', u'error_body': u'Please log back in.', u'error_title': u"You've Been Logged Out"}

So basically I have to re-authenticate after each call with the 6-digit pin.

Any idea what's going on?
 
You get to know which code is working and which one not..since it's automation everything happens in front of your eyes
 
Is there an authentication token you need to save and send back in with each subsequent request?
 
Is there an authentication token you need to save and send back in with each subsequent request?
I'm doing that for the csrf token. are there others?
 
If you use an Instagram account simultaneously on two different devices on the same network, does it cause a block?
 
There must be others to maintain the "Authenticated" state. Maybe check headers (authentication, cookies) in your first request and try to replicate that in subsequent requests.
+1. If you are using the API, there must be a way to send some token (jwt may be?) in the header. That will maintain the state.
 
{u'logout_reason': 2, u'status': u'fail', u'message': u'login_required', u'error_body': u'Please log back in.', u'error_title': u"You've Been Logged Out"}

It could be your IP / proxy is bad and flagged.
Or the account is flagged
Or you could be handling the cookies incorrectly causing this
 
Do you use fiddler or similar tool to monitor the ongoing http requests ? Then try comparing headers of successful requests with failed requests.
 
Back
Top