White-label social account connect
If your product posts for your users, they need to connect their social accounts. This guide covers how to make that flow feel like part of your app, what you can and can't white-label, and how to map accounts to your users.
Updated
What white-label means here
Connecting a social account is OAuth. At some point the user must see the platform's own login and consent screen. No posting API can hide that, and you shouldn't want it to: it's what makes the connection safe. What you control is everything before and after.
| Part of the flow | Who controls it |
|---|---|
| The Connect button and copy in your app | You |
| The platform login and consent screen | The platform, showing the platform app's name |
| Where the user lands afterward | You, via redirect_url |
| How accounts map to your users | You, via external_id |
The flow
- The user clicks Connect Instagram in your app.
- Your backend calls
POST /v1/accounts/connectwithplatform,external_id(your user ID) andredirect_url. - You redirect the user to the returned
url. - They log in on Instagram and approve.
- They land back on your
redirect_url. - Your backend lists the user's accounts with
GET /v1/accounts?external_id=user_123.
const r = await fetch("https://ugcapi.dev/v1/accounts/connect", {
method: "POST",
headers: {
"Authorization": "Bearer " + process.env.UGCAPI_KEY,
"Content-Type": "application/json",
},
body: JSON.stringify({
platform: "instagram",
external_id: "user_123",
redirect_url: "https://yourapp.com/settings/accounts",
}),
});
const { url } = await r.json();
return Response.redirect(url, 302);Choosing external IDs
- Use a stable internal ID, not an email. Emails change.
- For agencies, use the creator ID, or a 'client:creator' pair if the same creator works with several clients.
- Use the same
external_idon posts so results map back without extra lookups.
Design the screens around it
- Before the redirect, tell users what will happen: 'You'll log in with Instagram and approve posting.'
- For Instagram, say up front it needs a Business or Creator account. It saves a failed connect.
- For Facebook, explain they'll choose which Pages to connect.
- After the redirect, show the connected account's name and avatar right away.
- Show a Reconnect button when you get an
account.disconnectedwebhook.
Sending links outside your app
Agencies and creator networks often send connect links by email or DM, since creators don't log in to their tools. The same call works: create a link per creator per platform and send it. Set redirect_url to a simple thank-you page.
Your own platform apps
The platform's consent screen shows the name of the platform app that requests access. With UGC API, that is our app. If you need your brand there, you need your own TikTok, Meta and Google apps, with their reviews. Read doing it yourself vs UGC API for that tradeoff.
Full request and response details are in connect accounts. For how generator apps use this, see UGC generator apps.
Security notes
- Create connect links on your server. Never put your API key in the browser.
- Treat the
redirect_urllanding as a signal, not proof. Confirm the connection by listing accounts from your server. - Generate a fresh link each time. Don't reuse an old link in a newsletter.
- Let users disconnect from your app with
DELETE /v1/accounts/:id, and tell them they can also revoke access in the platform's settings.
These steps keep the flow simple for users and keep your key and accounts safe.
One more detail: account types. Instagram publishing needs a Business or Creator account, and Facebook publishing needs a Page. If a user connects a personal Instagram account, the connect fails or posts are rejected. Checking this in your own UI before the redirect saves support tickets.
FAQ
Can I connect accounts without sending users to the platform?
No. Every platform requires its own login and consent step. You can make it smoother by explaining it first and landing users back in your app right after.
Can I fully hide the platform's login screen?
No. OAuth requires the user to log in and consent on the platform's page. You control the screens before and after.
Can one user connect several accounts?
Yes. Create a connect link for each account. They all share the same external_id.
What does the user see on the consent screen?
The platform's own page, with the name of the platform app requesting access.
How do I know when a connection breaks?
You get an account.disconnected webhook. Show a Reconnect button that creates a new link.