Connect an account
Early access. Tell us what you're building and we'll set you up. Contact us
api.lempile.com/api/v1/accountsSigns an Instagram account in with its username and password, in its own new browser behind its own Lempile IP. Answers within 60 seconds: AccountCreated, or 202 Checkpoint when Instagram asks for a code or an approval first (answer it with POST /accounts/checkpoint), or is still signing in (CONNECTING: read the account until it's OK). A sign-in waits 5 minutes for its checkpoints. username may also be the account's email or phone number.
Only username and password sign in: a sessionid cookie answers 501, because Instagram ends a session that moves to a new device and 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.Request body
provideranyrequiredAlwaysINSTAGRAMusernamestringrequiredThe Instagram username.
passwordstring · passwordrequiredThe account's password. Used for this sign-in only.
Responses
201Signed in.
›
application/json
objectanyAlwaysAccountCreatedaccount_idstring
202Instagram asks for something first.
›
application/json
objectanyAlwaysCheckpointaccount_idstringcheckpointobject›Show fieldsHide fields
typestringOTP: a code Instagram sent (source:EMAIL,SMSorWHATSAPP).2FA: the account's two-factor code (APPorSMS).IN_APP_VALIDATION: someone approves the sign-in in the Instagram app (numberis the number to tap there, when Instagram shows one); then read the account until it'sOK.CONNECTING: Instagram is still signing in after 60 seconds; read the account until it'sOK.One ofOTP2FAIN_APP_VALIDATIONCONNECTINGsourcestringnumberstringIN_APP_VALIDATION: the number to tap in the app, when Instagram shows one.can_try_another_wayboolean
400errors/invalid_parameters: a field Lempile won't take; detail names it. Nothing was opened.
›
errors/invalid_parameters: a field Lempile won't take; detail names it. Nothing was opened.application/problem+json
typestringrequiredtitlestringstatusintegerrequireddetailstringWhat happened, in words, and whether anything was done.
codestringOn a
429:too_fast,daily_limitorhourly_limit.retry_afterintegerSeconds to wait.
retry_atstring · date-time
401A 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.
›
{ "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
errorstringrequiredmessagestring
402subscription_required (in error): the workspace has no active trial or subscription.
›
subscription_required (in error): the workspace has no active trial or subscription.application/json
errorstringrequiredmessagestring
403errors/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).
›
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
typestringrequiredtitlestringstatusintegerrequireddetailstringWhat happened, in words, and whether anything was done.
codestringOn a
429:too_fast,daily_limitorhourly_limit.retry_afterintegerSeconds to wait.
retry_atstring · date-time
409errors/already_exists: the account is already connected in this workspace.
›
errors/already_exists: the account is already connected in this workspace.application/problem+json
typestringrequiredtitlestringstatusintegerrequireddetailstringWhat happened, in words, and whether anything was done.
codestringOn a
429:too_fast,daily_limitorhourly_limit.retry_afterintegerSeconds to wait.
retry_atstring · date-time
425errors/auth_in_progress: a sign-in of this account is still running; it carries the checkpoint when Instagram asked for one.
›
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
typestringrequiredtitlestringstatusintegerrequireddetailstringWhat happened, in words, and whether anything was done.
codestringOn a
429:too_fast,daily_limitorhourly_limit.retry_afterintegerSeconds to wait.
retry_atstring · date-time
429errors/too_many_requests: Instagram asks to wait (retry_after).
›
errors/too_many_requests: Instagram asks to wait (retry_after).application/problem+json
typestringrequiredtitlestringstatusintegerrequireddetailstringWhat happened, in words, and whether anything was done.
codestringOn a
429:too_fast,daily_limitorhourly_limit.retry_afterintegerSeconds to wait.
retry_atstring · date-time
501errors/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.
›
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
typestringrequiredtitlestringstatusintegerrequireddetailstringWhat happened, in words, and whether anything was done.
codestringOn a
429:too_fast,daily_limitorhourly_limit.retry_afterintegerSeconds to wait.
retry_atstring · date-time
503errors/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.
›
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
typestringrequiredtitlestringstatusintegerrequireddetailstringWhat happened, in words, and whether anything was done.
codestringOn a
429:too_fast,daily_limitorhourly_limit.retry_afterintegerSeconds to wait.
retry_atstring · date-time
504errors/request_timeout: Instagram didn't answer within 100 seconds. A read changed nothing: try again.
›
errors/request_timeout: Instagram didn't answer within 100 seconds. A read changed nothing: try again.application/problem+json
typestringrequiredtitlestringstatusintegerrequireddetailstringWhat happened, in words, and whether anything was done.
codestringOn a
429:too_fast,daily_limitorhourly_limit.retry_afterintegerSeconds to wait.
retry_atstring · date-time
Was this page helpful?