mautrix / instagram

A Matrix-Instagram DM puppeting bridge
https://matrix.to/#/#instagram:maunium.net
GNU Affero General Public License v3.0
144 stars 28 forks source link

Login to Instagram API fails #30

Open LeChrisS opened 2 years ago

LeChrisS commented 2 years ago

after installing the bridge i ran login x y with x=username and y=password

bridge responds with Failed to log in: Request POST /api/v1/accounts/login/ failed: Sorry, there was a problem with your request.

python error looks like there is a problem communicating with the api:

[2021-12-28 15:29:11,935] [ERROR@mau.commands] Failed to log in
Traceback (most recent call last):
  File "/opt/mautrix-instagram/lib/python3.8/site-packages/mautrix_instagram/commands/auth.py", line 68, in login
    resp = await api.login(username, password)
  File "/opt/mautrix-instagram/lib/python3.8/site-packages/mauigpapi/http/login.py", line 53, in login
    return await self.std_http_post("/api/v1/accounts/login/", data=req,
  File "/opt/mautrix-instagram/lib/python3.8/site-packages/mauigpapi/http/base.py", line 121, in std_http_post
    json_data = await self._handle_response(resp)
  File "/opt/mautrix-instagram/lib/python3.8/site-packages/mauigpapi/http/base.py", line 147, in _handle_response
    await self._raise_response_error(resp)
  File "/opt/mautrix-instagram/lib/python3.8/site-packages/mauigpapi/http/base.py", line 190, in _raise_response_error
    raise IGResponseError(resp, data)

i checked the client response variable in https://github.com/mautrix/instagram/blob/7bf79badf5c96434df3f67e1543760fb0b844395/mauigpapi/http/base.py#L189 and found out that i get a <ClientResponse(https://i.instagram.com/api/v1/accounts/login/) [403 Forbidden]>

i guess instagram changed their api.

does anybody have the same issue? thanks!

meganoob1337 commented 2 years ago

Yes i have the Same Problem (i think)

mautrix-instagram     | Traceback (most recent call last):
mautrix-instagram     |   File "/usr/lib/python3.9/site-packages/mautrix_instagram/commands/auth.py", line 78, in login
mautrix-instagram     |     resp = await api.login(username, password)
mautrix-instagram     |   File "/opt/mautrix-instagram/mauigpapi/http/login.py", line 58, in login
mautrix-instagram     |     return await self.std_http_post(
mautrix-instagram     |   File "/opt/mautrix-instagram/mauigpapi/http/base.py", line 151, in std_http_post
mautrix-instagram     |     json_data = await self._handle_response(resp)
mautrix-instagram     |   File "/opt/mautrix-instagram/mauigpapi/http/base.py", line 181, in _handle_response
mautrix-instagram     |     await self._raise_response_error(resp)
mautrix-instagram     |   File "/opt/mautrix-instagram/mauigpapi/http/base.py", line 196, in _raise_response_error
mautrix-instagram     |     raise IGRateLimitError(resp, data)
mautrix-instagram     | mauigpapi.errors.response.IGRateLimitError: Request POST /api/v1/accounts/login/ failed: Please wait a few minutes before you try again.
robinoph commented 2 years ago

Am also having this problem for a while now.

Running mautrix-instagram 0.2.1 in provided Docker container.

[2022-09-26 15:56:57,853] [ERROR@mau.commands] Failed to log in
Traceback (most recent call last):
  File "/usr/lib/python3.10/site-packages/mautrix_instagram/commands/auth.py", line 76, in login
    resp = await api.login(username, password)
  File "/opt/mautrix-instagram/mauigpapi/http/login.py", line 58, in login
    return await self.std_http_post(
  File "/opt/mautrix-instagram/mauigpapi/http/base.py", line 156, in std_http_post
    json_data = await self._handle_response(resp)
  File "/opt/mautrix-instagram/mauigpapi/http/base.py", line 189, in _handle_response
    await self._raise_response_error(resp)
  File "/opt/mautrix-instagram/mauigpapi/http/base.py", line 239, in _raise_response_error
    raise IGResponseError(resp, data)
mauigpapi.errors.response.IGResponseError: Request POST /api/v1/accounts/login/ failed: Sorry, there was a problem with your request.

Same issue being mentioned here btw:

https://github.com/mautrix/instagram/issues/9