instagram_login
Recover an expired Instagram session or submit a two-factor code. Reuses cached credentials to authenticate without forcing repeated logins.
Instructions
Authenticate with Instagram using the credentials in the server's .env.
Login is automatic on first use, so call this only to recover from an expired session or to supply a two-factor/challenge code. The session is cached on disk and reused, which matters: repeatedly logging in from scratch is what makes Instagram flag an account.
Args: verification_code: The code Instagram asked for, if any. force: Re-authenticate even if this process already holds a session.
Returns: logged_in (bool), logged_in_as (str), summary (str) describing whether a cached session was reused, and session_file (str) where it was saved.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| force | No | Discard the in-process session and authenticate again. Use after a session expires. | |
| verification_code | No | Six-digit 2FA or challenge code, e.g. '123456'. Leave empty unless a previous call asked for one. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||