Skip to content
This repository has been archived by the owner on Aug 25, 2023. It is now read-only.

Unable to login #346

Open
bojanmilinkovic opened this issue May 10, 2021 · 7 comments
Open

Unable to login #346

bojanmilinkovic opened this issue May 10, 2021 · 7 comments

Comments

@bojanmilinkovic
Copy link

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?

@websines
Copy link

websines commented May 14, 2021

@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.

@vaebhav
Copy link

vaebhav commented May 21, 2021

@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.

@websines
Copy link

@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?

@vaebhav
Copy link

vaebhav commented May 23, 2021

@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

@Davincible
Copy link

see #353

@AustinMCrane
Copy link

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

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

6 participants
@AustinMCrane @Davincible @vaebhav @websines @bojanmilinkovic and others