Log inStart Free Trial
easyCoexistence Official APIs

How to connect a TikTok account to an API or AI agent

A TikTok account connects to an API or AI agent through TikTok's authorization screen: the owner signs in and approves the permissions the app requests, such as publishing posts, managing comments and reading insights. TikTok returns a code, valid for 10 minutes and usable once, and the app exchanges it for the account's access token, acting within those permissions until the owner removes its access.

easyCoexistence connects personal and Business TikTok accounts through TikTok's own sign-in, from the dashboard or a connect link your customers open themselves, then gives Claude, ChatGPT or your own platform their tools, with tokens renewed and each account checked around the clock.

10 minutes

How long the authorization code TikTok returns after approval stays valid, for a single exchange.

Manage Business Comment

TikTok's permission for replying to, liking, hiding and deleting comments; reading them is a separate permission.

1 hour

How long an easyCoexistence connect link for a customer's TikTok account works before the session expires.

3 days

Free trial counted from the account's first connection; a card is saved before the first sign-in.

What does TikTok's authorization screen ask?

To approve an app's access to the account. The app sends the owner to its TikTok account holder authorization URL, where the app's logo appears with the permissions it requests, such as publishing posts, reading and managing comments and reading insights. Once the owner approves, TikTok redirects to the app's registered address with an authorization code that lasts 10 minutes and works once, and the app trades it for the account's tokens. If the owner approved the same permissions before, TikTok skips the review page and redirects straight back.

Why approve each permission?

Because an access token carries only what the owner approved, and each Accounts API endpoint needs its own permission. TikTok's permission reference puts publishing under Video Publish, reading comments under Get Business Comment, replying, hiding and deleting under Manage Business Comment, and the account's posts and profile insights under permissions of their own. A call whose permission is missing fails with error 40001, and the fix is for the owner to authorize the app again.

How do you connect a TikTok account to easyCoexistence?

From the dashboard, in a browser, because the sign-in happens on TikTok's own page. Choose New connection, then TikTok, sign in to the account and approve the permissions; you come back to the dashboard with the account connected. A card is saved before the first connection, nothing is charged for the first 3 days, and personal and Business accounts both work. The whole sign-in has to finish within 10 minutes of starting it; after that, start again from New connection.

What happens once the account is connected?

Your AI can use it. list_social_accounts returns the account with its account_id, the ID each TikTok tool takes, and its status. Comment events for the account start reaching easyCoexistence, its day-long access token is renewed before it expires, and the account is checked every 6 hours, with an email to you if TikTok refuses it. The dashboard gets a page for the account, with its health, where its comment events go and how to use it from your AI.

How does a platform connect its customers' TikTok accounts?

With a connect link, which the customer opens without an easyCoexistence account. Your backend posts to /connect-sessions with channel set to tiktok and your redirect_url, then sends the customer to the url it returns. The hosted page shows one button, Continue with TikTok, which opens TikTok's screen in the same tab, so it works on a phone too. The customer comes back to your redirect_url with a channel_id, and the account belongs to, and is billed to, your account.

Create a connect link for a TikTok account
curl -X POST https://easycoexistence.com/api/v1/connect-sessions \
  -H "Authorization: Bearer $EC_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "channel": "tiktok",
    "redirect_url": "https://app.example.com/tiktok/connected",
    "external_ref": "customer_1042"
  }'

# 201 Created
# { "id": "cs_…", "url": "https://easycoexistence.com/connect/cs_…", "channel": "tiktok", "status": "created", … }

What if the sign-in does not finish?

The account is connected only once TikTok's screen has been approved and the code exchanged, so a failed attempt is simply started again:

  • The owner closes or declines TikTok's screen: the dashboard says nothing was connected, and New connection starts over.
  • More than 10 minutes pass: the sign-in expires, and a customer on a connect link returns to the hosted page to try again.
  • The TikTok account is already connected to another easyCoexistence account: remove it there first, then connect it here.
  • A connect link is past its hour: create a new session for the customer.

How to set it up

  1. Open New connectionSign in to easyCoexistence, open the dashboard and choose New connection, then TikTok. An account with no card saved is asked for one first.
  2. Sign in on TikTokTikTok's page opens. Sign in with the TikTok account you want to connect.
  3. Approve the permissionsReview the permissions easyCoexistence asks for, approve each of them, and authorize.
  4. Back in the dashboardTikTok returns you to easyCoexistence, where the account shows as connected and your AI finds it with list_social_accounts.

Common mistakes

  • Leaving a permission unapproved on TikTok's screen. The token then lacks that scope, and the matching calls keep failing until the owner authorizes the app again.
  • Sending a customer the dashboard link. Customers connect through a connect link from your backend, which needs no easyCoexistence account and lands them back in your app.
  • Expecting the AI to sign in from the chat. TikTok's authorization needs a browser, so get_social_connect_link hands you the dashboard link and the steps instead.
Doing this with EasyCoexistence

US$ 9 to US$ 0.75 per connection per month, falling as you add connections, with the first 3 days free.

easyCoexistence is a multichannel API and MCP server that connects AI agents such as Claude and ChatGPT to WhatsApp, Instagram, TikTok, Facebook and more. On WhatsApp it uses Coexistence: the business keeps using its number in the WhatsApp Business app while the AI works through Meta's official API.

Frequently asked questions

Do I need a TikTok Business account to connect?

No. Personal and Business accounts both connect, and a few insight fields need Advanced Access or a Verified Business Account.

Can Claude or ChatGPT connect the account for me?

They can hand you the link. get_social_connect_link returns the dashboard address and the steps, since TikTok's sign-in has to happen in a browser.

Does easyCoexistence see my TikTok password?

No. You sign in on TikTok's own page, and TikTok gives easyCoexistence an authorization code, never your password.

Can a customer connect their account from a phone?

Yes. The connect link's TikTok button opens TikTok's sign-in in the same tab, which works on a phone.

Keep reading

Connect your first channel in two minutes.

No platform reviews to wait for. Connect WhatsApp, Instagram, TikTok or another channel, then ask your AI to post, reply or report, and watch it work.

  • 3 days free
  • Cancel any time
  • Official APIs only
  • Monitored 24/7

Verified on