Create a hosted link
Early access. Tell us what you're building and we'll set you up. Contact us
api.lempile.com/api/v1/hosted/accounts/linkA link to Lempile's own sign-in page, for someone else to connect their Instagram account (with Instagram's code when it asks). The new account joins the key's workspace. A link lasts 24 hours at most; treat it as a secret. "type": "reconnect" with reconnect_account signs an existing account in again. 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
typestringrequiredOne ofcreatereconnectprovidersarray of anyrequiredapi_urlstringYour base URL, as Unipile asks for it.
expiresOnstring · date-timerequiredAt most 24 hours from now.
reconnect_accountstringWith
type: "reconnect": the account's id.
Responses
201The link.
›
application/json
objectanyAlwaysHostedAuthUrlurlstring
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.
›
{ "error": "unauthorized", "message" }. errors/disconnected_account (problem JSON): Instagram signed the account out; connect it again.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/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).
›
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
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
404errors/resource_not_found: no such account in this workspace, or no such chat, message, person or post.
›
errors/resource_not_found: no such account in this workspace, or no such chat, message, person or post.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?