---
title: "Get a link to connect an account"
method: GET
path: "/connect/{network}"
tags: ["Accounts"]
---

# Get a link to connect an account

`GET /connect/{network}`

## Request

- Base URL: `https://api.rizamo.com/v1`
- URL: `https://api.rizamo.com/v1/connect/{network}`
- Auth: HTTP bearer

A link to send a person to within 30 minutes: it goes straight to the network, and connects accounts once (a preview or a second browser that opens it uses nothing up). They log in on the network, with no Rizamo account, and come back to `redirectUrl`, or, without one, land on a Rizamo page that says what was connected (for a chat agent, a script or n8n). `instagram` is Instagram Login, for an Instagram professional account on its own; `facebook` is Facebook Login, its Pages and the Instagram accounts linked to them, which can also add music to reels and get each story's final numbers when it ends (deleting Instagram posts will need it too, once Meta reviews Rizamo's access). LinkedIn connects in the web app only, as LinkedIn's terms ask: no connect link offers it. Once connected there, LinkedIn accounts publish and report through the API and MCP.

A login that reaches one new account the key may add connects it at once; one that reaches several (Pages, YouTube channels), or an account already in the team, shows the person a page to pick them, with only new accounts ticked. An account already in the team in a profile the key does not reach is never added. With `connectionId`, only that login's accounts are renewed.

Back at `redirectUrl`, Rizamo adds `status` (connected or error), `network`, `profileId`, and either `accountIds` with each one's `billing` in the same order, comma-separated, or `error` (cancelled, refused, no_accounts, expired, used, unavailable, forbidden, gone, failed) and `message`. Nothing in it works without your key: read the accounts with `GET /accounts/{id}`. A return can arrive more than once (a reload): take `GET /accounts` (`list_accounts`) as the truth. A link opened once it is used or expired, or after your key lost access, stays on a Rizamo page that says why: only a person back from the network comes to `redirectUrl`.

Accounts are billed as in the web app: the first 2 free. On the free plan the rest arrive `awaiting_payment` until an owner starts a plan. On a paid plan they are charged at once to the card on file: your call is the consent. A charge that needs the card holder, or more accounts than the owner lets the API add this period, leaves them `awaiting_payment` until an owner pays in the web app. The person connecting never sees prices.

With `connectionId`, the person logs in again for that login's accounts (an expired login): only accounts already in the team are updated, and `network` must be the login's.

## Path parameters

- `network` 'facebook' | 'instagram' | 'tiktok' | 'threads' | 'youtube', required: Where the person logs in: instagram (Instagram Login, a professional account on its own), facebook (Facebook Login: Pages and the Instagram accounts linked to them), tiktok, threads or youtube. LinkedIn connects in the web app only, as LinkedIn's terms ask: no connect link offers it. Once connected there, LinkedIn accounts publish and report through the API and MCP.

## Query parameters

- `profileId` string: The profile (`prof_`) new accounts go to. Required unless `connectionId` is given.
- `redirectUrl` string: Where the person comes back to: an absolute https address, or http://localhost or http://127.0.0.1 (any port) while you develop. Fixed in the link: nothing the person does can change it. Leave it out when you have no address (a chat agent, a script): the person lands on a Rizamo page that names what was connected, or says why not.
- `connectionId` string: Log in again for this login (`Account.connectionId`), to renew it.

## Response `200`

OK

- ConnectLink
  - `url` string, required: Send the person here within 30 minutes. It is Rizamo's address, which sends them straight on to the network; it connects accounts once.
  - `expiresAt` string, date-time, required: Until when the link opens. After it, ask for another.
  - `profile` object, nullable, required: The profile the new accounts join. Null with `connectionId`: a login again keeps each account in its profile.
    - `id` string, required
    - `name` string, required

## Other responses

- `400`: `invalid_request`: A field is missing or wrong, or the request cannot be done as asked: the message names the field or says what to change.
- `401`: `unauthorized`: No API key or sign-in, or the key does not work: it was deleted, or it expired.
- `403`: `forbidden`: The caller may not do this: the key or agent lacks the scope (the message names it), or the action needs another role or a fresh sign-in.
- `404`: `not_found`: No such object, or it is outside your team or the profiles your key reaches.
- `429`: `rate_limited`: Over one of Rizamo's limits, or a network asked Rizamo to slow down: wait for `Retry-After` seconds, or as long as the message says.
- `500`: `internal`: Our side failed: retry, and send the `requestId` if it keeps failing.
- `503`: `timeout`: The request took too long to work out, most often a report: try again in a moment, or ask a report for a shorter period or one profile.

---

[API](https://skmtc.dev/rizamo/apis/rizamo-api.md) - [All operations](https://skmtc.dev/rizamo/apis/rizamo-api/llms.txt) - [OpenAPI document](https://skmtc.dev/rizamo/apis/rizamo-api/revisions/31b0c1b1ffb5?raw)
