diezo / Ensta

🔥 Fast & Reliable Python Package For Instagram API - 2024
https://bit.ly/ensta-discord
MIT License
371 stars 44 forks source link

can u add Instagram account checker with api methode #44

Closed 4LIF27 closed 10 months ago

4LIF27 commented 10 months ago

can u add Instagram account checker with api methode

diezo commented 10 months ago

do you mean to check if the given username password combination is correct or to check whether an Instagram account with the specified username/userid exists?

4LIF27 commented 10 months ago

do you mean to check if the given username password combination is correct or to check whether an Instagram account with the specified username/userid exists?

given username password combination is correct or to check, example : Manutd:ggmu123 is correct mancity:mancity321 password wrong

diezo commented 10 months ago

yes you can easily do that with ensta. just initialise host class with the given credentials and check if it raises any exception.

here's the code:

from ensta import Host
from ensta.lib.Exceptions import AuthenticationError

success: bool

try:
    host = Host(username, password)
    success = True

except AuthenticationError as e:
    success = False
    print(e)  # it can be "User doesn't exist." or "Invalid password."

print(success)

please do let me know if that solved your issue.