Skip to content
Docs

Reconnect an account

Early access. Tell us what you're building and we'll set you up. Contact us

POSTapi.lempile.com/api/v1/accounts/{account_id}

Signs an account that shows CREDENTIALS in again, with the same body as POST /accounts. Answers AccountReconnected or a Checkpoint. The account keeps its id and its IP. Instagram is in early access: a workspace that isn't open for it yet gets 403 errors/feature_not_subscribed (write to support@lempile.com).

Scope: accounts.write.

Authentication

X-API-KEY header·A Lempile API key, made in the dashboard under Access tokens.

Path parameters

  • account_idstringrequired

    Lempile id, Instagram user id or username.

Request body

  • provideranyrequired
    AlwaysINSTAGRAM
  • usernamestringrequired

    The Instagram username.

  • passwordstring · passwordrequired

    The account's password. Used for this sign-in only.

Responses

200

Signed in again.

›

application/json

  • objectany
    AlwaysAccountReconnected
  • account_idstring
202

Instagram asks for something first.

›

application/json

  • objectany
    AlwaysCheckpoint
  • account_idstring
  • checkpointobject
    ›Show fields
    • typestring

      OTP: a code Instagram sent (source: EMAIL, SMS or WHATSAPP). 2FA: the account's two-factor code (APP or SMS). IN_APP_VALIDATION: someone approves the sign-in in the Instagram app (number is the number to tap there, when Instagram shows one); then read the account until it's OK. CONNECTING: Instagram is still signing in after 60 seconds; read the account until it's OK.

      One ofOTP2FAIN_APP_VALIDATIONCONNECTING
    • sourcestring
    • numberstring

      IN_APP_VALIDATION: the number to tap in the app, when Instagram shows one.

    • can_try_another_wayboolean
400

errors/invalid_parameters: a field Lempile won't take; detail names it. Nothing was opened.

›

application/problem+json

  • typestringrequired
  • titlestring
  • statusintegerrequired
  • detailstring

    What happened, in words, and whether anything was done.

  • codestring

    On a 429: too_fast, daily_limit or hourly_limit.

  • retry_afterinteger

    Seconds to wait.

  • retry_atstring · date-time
401

A missing or invalid API key answers { "error": "unauthorized", "message" }. errors/disconnected_account (problem JSON): Instagram signed the account out; connect it again. errors/invalid_credentials: Instagram refused the username or password.

›

application/json

  • errorstringrequired
  • messagestring
402

subscription_required (in error): the workspace has no active trial or subscription.

›

application/json

  • errorstringrequired
  • messagestring
403

errors/feature_not_subscribed (Instagram isn't open to this workspace yet), errors/password_reset_required (Instagram wants a new password), errors/action_required (something done on Instagram itself) or errors/insufficient_permissions (the key lacks the scope).

›

application/problem+json

  • typestringrequired
  • titlestring
  • statusintegerrequired
  • detailstring

    What happened, in words, and whether anything was done.

  • codestring

    On a 429: too_fast, daily_limit or hourly_limit.

  • retry_afterinteger

    Seconds to wait.

  • retry_atstring · date-time
404

errors/resource_not_found: no such account in this workspace, or no such chat, message, person or post.

›

application/problem+json

  • typestringrequired
  • titlestring
  • statusintegerrequired
  • detailstring

    What happened, in words, and whether anything was done.

  • codestring

    On a 429: too_fast, daily_limit or hourly_limit.

  • retry_afterinteger

    Seconds to wait.

  • retry_atstring · date-time
425

errors/auth_in_progress: a sign-in of this account is still running; it carries the checkpoint when Instagram asked for one.

›

application/problem+json

  • typestringrequired
  • titlestring
  • statusintegerrequired
  • detailstring

    What happened, in words, and whether anything was done.

  • codestring

    On a 429: too_fast, daily_limit or hourly_limit.

  • retry_afterinteger

    Seconds to wait.

  • retry_atstring · date-time
429

errors/too_many_requests: Instagram asks to wait (retry_after).

›

application/problem+json

  • typestringrequired
  • titlestring
  • statusintegerrequired
  • detailstring

    What happened, in words, and whether anything was done.

  • codestring

    On a 429: too_fast, daily_limit or hourly_limit.

  • retry_afterinteger

    Seconds to wait.

  • retry_atstring · date-time
501

errors/feature_not_implemented: a field or option Lempile doesn't do for Instagram (detail says which), or an account of another network. Nothing was done.

›

application/problem+json

  • typestringrequired
  • titlestring
  • statusintegerrequired
  • detailstring

    What happened, in words, and whether anything was done.

  • codestring

    On a 429: too_fast, daily_limit or hourly_limit.

  • retry_afterinteger

    Seconds to wait.

  • retry_atstring · date-time
503

errors/service_unavailable: Lempile can't start the sign-in right now (no free IP for a new account, or its browser server is busy). Nothing was done.

›

application/problem+json

  • typestringrequired
  • titlestring
  • statusintegerrequired
  • detailstring

    What happened, in words, and whether anything was done.

  • codestring

    On a 429: too_fast, daily_limit or hourly_limit.

  • retry_afterinteger

    Seconds to wait.

  • retry_atstring · date-time
504

errors/request_timeout: Instagram didn't answer within 100 seconds. A read changed nothing: try again.

›

application/problem+json

  • typestringrequired
  • titlestring
  • statusintegerrequired
  • detailstring

    What happened, in words, and whether anything was done.

  • codestring

    On a 429: too_fast, daily_limit or hourly_limit.

  • retry_afterinteger

    Seconds to wait.

  • retry_atstring · date-time

Was this page helpful?