Appearance
Get social network authentication URL
Generate an OAuth authentication URL for connecting a social media account. This endpoint returns a URL that you should redirect users to in order to authenticate and authorize your application to access their social media account.
Prerequisites:
- The social network must be configured for your organization using the POST /v1/social-networks endpoint
- You must have valid OAuth credentials (client_key and client_secret) stored for the specified network
Workflow:
- Ensure the social network is configured for your organization
- Call this endpoint to get the authentication URL (optionally include tenant_id to associate accounts with your end-users)
- Redirect the user to the returned auth_url
- The user will authenticate on the social network's platform
- The user will be redirected back to your specified redirect_uri (or default)
- Handle the OAuth callback to complete the account connection
Tenant ID: Optionally provide a tenant_id to associate the connected social account with a specific tenant/customer in your system. This enables filtering social accounts by tenant using GET /v1/social-accounts?tenantId=xxx. The tenant_id must contain only alphanumeric characters, underscores, and hyphens.
Redirect URI: If you provide a redirect_uri in the request body, it must match one of the authorized redirect URIs configured in your OAuth application on the social network's developer portal. If not provided, a default redirect URI will be used.
Important: For white-label users, this is a very important endpoint as it guarantees your customers never see our branding in the authentication flow.
POST/v1/social-networks/{network}/auth-url
Path Parameters
networkstring
Request Body
application/json
redirect_uri?string
Optional redirect URI for successful OAuth callback. If not provided, a default redirect URI will be used - which redirects in our management dashboard. The redirect URI usually is used to redirect somewhere in your own application to continue the user journey.
Formaturi
tenant_id?string
Optional customer-provided tenant identifier. This will be associated with any social accounts created during this OAuth flow, enabling you to filter accounts by tenant later using the GET /v1/social-accounts endpoint.
Response Body
200application/json
400application/json
404application/json
500application/json
JavaScript
Go
Java
C#
cURL
TypeScript
Python
Swift
const body = JSON.stringify({})
fetch(" {
method: "POST",
headers: {
"Content-Type": "application/json"
},
body
})200400404500
{
"success": true,
"data": {
"auth_url": "
}
}{
"success": false,
"error": "Invalid payload",
"details": {
"network": {
"_errors": [\
"Required"\
]
}
}
}{
"success": false,
"error": "Invalid payload",
"details": {
"network": {
"_errors": [\
"Required"\
]
}
}
}{
"success": false,
"error": "Internal server error",
"message": "Database connection failed"
}Disconnect a social network DELETE\ \ Previous Page Configurations\ \ Next Page