Open bojanmilinkovic opened 3 years ago
@bojanmilinkovic I found the issue. I guess you are running from a webserver like me, this makes Instagram think that a bot is trying to log in and blocks it.
I found the solution is to send the insta.Login()
with a http transport which has a proxy.
` insta := goinsta.New(username, password)
proxyUrl, err := url.Parse("http://yourproxy:port")
if err != nil {
log.Fatalf("Error: %s", err)
}
httpClient := &http.Client{Transport: &http.Transport{Proxy: http.ProxyURL(proxyUrl)}}
insta.SetHTTPClient(httpClient)
if err := insta.Login(); err != nil {
log.Fatal(err)
}
`
However now what happens in when I send a request with this it returns an error
{"message":{"Op":"Post","URL":"https://i.instagram.com/api/v1/accounts/read_msisdn_header/","Err":{}}}
I do not know what this means, hopefully you can find something, maybe my transport code is wrong. Let me know if you can get something.
@bojanmilinkovic - Faced a similar error while trying to insta.Login()
. Its a general thing that instagram does and blocks the user's access as you might have been mimicking a bot. The error prompt/down time will cease of within 12-24 hours.
@vaebhav did it work for you? I tried with a lot of proxies using the insta.SetProxy()
, but didn't work for me like I said above? Can you help me with this?
@websines - i dont use proxies to login, i meant i faced a similar issue while using the traditional way - 'insta.New()' and 'Login()', and was getting the same error which phased out after 1-2 days of inactivity
this is still broken, seems like maybe a better explination of how to do a basic login would be great. or if there is a waiting period for use then explaining that
When I pass my credentials and try to login calling method Login(), I get the error: Please wait a few minutes before you try again Can someone help please?