Skip to content
Docs

Answer a checkpoint

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

POSTapi.lempile.com/api/v1/accounts/checkpoint

Gives Instagram what a Checkpoint asked for: the code it sent (OTP and 2FA: 4 to 8 digits), or TRY_ANOTHER_WAY (Instagram's "Try another way": another kind of check). Answers AccountCreated, or another Checkpoint when Instagram asks for one more thing. A sign-in waits 5 minutes for its checkpoints; after that, 408: start again with POST /accounts.

Scope: accounts.write.

Authentication

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

Request body

  • provideranyrequired
    AlwaysINSTAGRAM
  • account_idstringrequired
  • codestringrequired

    The code, or TRY_ANOTHER_WAY.

Responses

201

Signed in.

›

application/json

  • objectany
    AlwaysAccountCreated
  • account_idstring
202

One more checkpoint.

›

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_checkpoint_solution: a wrong code; send the right one.

›

application/json

  • errorstringrequired
  • messagestring
402

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

›

application/json

  • errorstringrequired
  • messagestring
403

errors/insufficient_permissions (the key lacks the scope), errors/account_restricted (Instagram blocked the action, restricted the account or asks for a check: someone has to look at it on Instagram) or errors/action_required (the account waits for something done on Instagram itself; account_status and reason say what).

›

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
408

errors/request_timeout: the sign-in waited 5 minutes for its checkpoints. Start again with POST /accounts.

›

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
409

errors/checkpoint_switching_not_available: Instagram offers no other way.

›

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: the account isn't ready yet, or its browser can't be reached right now. 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?