Generate OAuth URL
Generates a browser authorization URL for connecting a new social account to a project.
This endpoint is useful for multi-user integrations where your application lets your own users, clients, or brands connect their social accounts to WoopSocial without giving them access to your WoopSocial account.
A common flow is:
- Create or select a WoopSocial project for your user, client, or brand.
- Call this endpoint from your backend with that
projectId, the targetplatform, and aredirectUrlin your application. - Open the returned
urlin your user’s browser. - After OAuth completes, WoopSocial redirects the browser back to
redirectUrlwith result query parameters. - Use
projectIdandsocialAccountIdsfrom the redirect, or callGET /social-accounts?projectId=..., to store or confirm the connected account in your application.
When redirectUrl is provided, the browser is redirected back to that URL after
the OAuth callback is handled.
For Facebook, WoopSocial shows a page-selection screen after authorization
because Facebook may return more pages than the user appeared to select in
the Facebook dialog in cases where the user has authorized with WoopSocial previously. The selected pages are connected to the single
projectId from this request, then WoopSocial redirects back to
redirectUrl when one was provided.
When redirectUrl is provided, WoopSocial appends these query parameters on success:
status=successprojectId: the project identifier from the requestplatform: the connected social platformsocialAccountIds: comma-separated connected social account identifiers. This may contain one or more IDs depending on the platform OAuth flow.
When redirectUrl is provided, WoopSocial appends these query parameters on failure:
status=errorprojectId: the project identifier from the requestplatform: the requested social platformerror: an OAuth callback error code
If the OAuth callback state is missing or expired, WoopSocial cannot safely
determine the original redirectUrl, so the callback returns an HTTP error
instead of redirecting.
The redirect never includes OAuth tokens or credentials.
Authorizations
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Body
Project identifier.
Identifies which social media platform this data structure targets.
PINTEREST, LINKEDIN, LINKEDIN_PAGES, INSTAGRAM, FACEBOOK, THREADS, TIKTOK, X, YOUTUBE, WOOPTEST Optional URL in your application to return the browser to after OAuth completes.
Use this for multi-user integrations where your users connect their own social accounts through your app. WoopSocial appends OAuth result query parameters to this URL so your app can finish the connection flow.
The redirect does not include tokens or credentials.
"https://app.example.com/oauth/complete"
Response
OAuth authorization URL created.
Browser URL that starts the OAuth authorization flow.