-
Notifications
You must be signed in to change notification settings - Fork 719
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[BUG] JSONDecodeError for TOTP 2FA (Google Authenticator) #687
Comments
@hittiks it looks like instagram has changed api, can you fix it? |
@adw0rd No, I can't fix it |
To recreate the behavior, you need to follow the link https://i.instagram.com/challenge/?next=/api/challenge/ (after 2FA) So I tried to run that long HTML and got this page: I am using Heroku to run my code in the cloud and passing this challenge from mobile can't solve the problem Button "Это я" have this code (maybe it will be useful): |
Same error for me |
@adw0rd Well, I tried to fix it. I was able to go through that page and get |
I have the same problem. |
a quick fix:
from ensta import Host
host = Host(username, password, totp_token=token) |
I am getting a JSONDecodeError exception when I try to perform two factor authentication with Google Authenticator.
Am I doing something wrong or has Instagram changed the API?
Traceback:
Status 200: JSONDecodeError in private_request (user_id=10342827286, endpoint=/challenge/) >>>
<!DOCTYPE html>
(long html...)future: <Task finished coro=<Dispatcher._process_polling_updates() done, defined at /app/.heroku/python/lib/python3.7/site-packages/aiogram/dispatcher/dispatcher.py:407> exception=ClientJSONDecodeError('JSONDecodeError [Errno Expecting value]
<!DOCTYPE html>\n<html lang="en" class="no-js logged-in client-root touch">\n <head>\n <meta charset="utf-8">\n
(long html...)
</script>\n </body>\n</html>
instagrapi.exceptions.ClientJSONDecodeError: JSONDecodeError [Errno Expecting value]
<!DOCTYPE html>
(long html...)raise JSONDecodeError("Expecting value", s, err.value) from None
json.decoder.JSONDecodeError: Expecting value: line 1 column 1 (char 0)
raise RequestsJSONDecodeError(e.msg, e.doc, e.pos)
requests.exceptions.JSONDecodeError: [Errno Expecting value]
<!DOCTYPE html>
(long html...)The text was updated successfully, but these errors were encountered: