Partner API

How to build a social account picker with stable avatars and usernames

8 min read

Quick answer

Build the picker by fetching /api/v1/accounts server-side, displaying platform, display name, optional unique username and avatarImageUrl, and persisting the selected platform-plus-handle pair. Refresh before publishing, remove stale selections and keep each customer’s personal MultiPost token and account cache isolated.

01.

How do you build a connected social account picker with stable avatars and usernames?

Fetch /api/v1/accounts on your server, render the returned platform, display name, unique username and avatarImageUrl, and store the selected platform-plus-handle pair as the publish target. MultiPost returns public account metadata only; provider tokens never enter the picker response.

Show both display name and unique username when they differ. A display name can change or collide, while the returned handle is the value the Partner API uses to resolve one of several accounts on the same network.

02.

What is the fast way to populate the picker with MultiPost?

The fast way is to authenticate server-side with the customer's personal token, call the accounts endpoint and send only the display fields your UI needs. If the list is empty, use the connectUrl from/api/v1/me to send the customer to MultiPost account connection.

Publishing from the selected account requires Pro or Agency. Link to plans and billing whencanPublish is false, but allow users to understand their connection state before asking them to choose a destination.

03.

Which account fields should the picker display and persist?

Display platform name, avatar, display name and unique username; persist platform and handle for the target. Treat username as optional because a network may not expose one or an older connection may need reconnection before MultiPost can populate it.

Use avatarImageUrl in the UI rather than rebuilding provider CDN URLs. MultiPost normalizes expiring network avatars through its own media path. The guide to managing multiple accounts without sharing passwords provides the matching OAuth model.

04.

How should the picker handle reconnects, removals and renamed accounts?

Refresh the account list before a publish session and invalidate any selection whose platform-and-handle pair is no longer returned. Do not keep a deleted account selectable merely because its avatar remains in a client cache.

If username is missing for an older TikTok grant, explain that reconnecting can populate the newer profile scope. Keep the returned handle as the API target and never substitute an edited label from your own interface.

05.

How does MultiPost keep the account picker inside a safe tenant boundary?

MultiPost scopes the accounts response to the bearer token's owner and returns no provider credentials. Your SaaS completes the boundary by storing one token per tenant, keeping calls on the server and never mixing cached account lists between customers.

Frequently asked questions

Which endpoint lists the token owner’s connected accounts?

Call GET /api/v1/accounts with the customer’s personal MultiPost bearer token on your server.

Which avatar field should a picker render?

Use avatarImageUrl, which MultiPost normalizes for display even when a provider uses expiring CDN avatars.

What should be persisted as the publish target?

Persist the exact platform and handle returned by the accounts endpoint.

Can username be missing?

Yes. Some networks do not expose one, and an older TikTok grant may need reconnection to populate the newer profile scope.

Start free

Let customers recognize the account before your product publishes.

MultiPost supplies safe public identity fields while provider credentials remain outside your account picker.

Back to the blog