-
Notifications
You must be signed in to change notification settings - Fork 24
Authentication
Stan van Rooy edited this page Jul 27, 2021
·
4 revisions
If you want to login through Instauto, you need to construct the ApiClient with both a username and password. Example:
from instauto.api.client import ApiClient
client = ApiClient(username='your_username', password='your_password')
client.log_in()It is possible that Instagram flags the request as suspicious, in those cases, one of the following will happen:
- you need to verify the login on another device;
- or you need to enter a verification code, this requires input through the terminal.
Instauto supports two-factor authentication. To verify your account, you can either:
- enter the verification code in the the terminal;
- or use a function provided to the constructor named
_2fa_function:
def get_2fa_code(username: str) -> str:
# do something to get the code
return code
client = ApiClient(username='your_username', password='your_password', _2fa_function=get_2fa_code)