Skip to content
Docs

Create a hosted link

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

POSTapi.lempile.com/api/v1/hosted/accounts/link

A 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

  • typestringrequired
    One ofcreatereconnect
  • providersarray of anyrequired
  • api_urlstring

    Your base URL, as Unipile asks for it.

  • expiresOnstring · date-timerequired

    At most 24 hours from now.

  • reconnect_accountstring

    With type: "reconnect": the account's id.

Responses

201

The link.

›

application/json

  • objectany
    AlwaysHostedAuthUrl
  • urlstring
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.

›

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

Was this page helpful?