Connect
Start OAuth connection for a platform
Initiate an OAuth connection flow for any supported social media platform.
Standard Flow (Hosted UI): For Facebook connections, Late hosts the page selection UI:
- Call this endpoint with your API key and
redirect_url(optional) - Redirect your user to the returned
authUrl - After OAuth, the user is redirected to Late’s hosted page selector at
/connect/facebook/select-page?profileId=X&tempToken=Y&userProfile=Z&redirect_url=YOUR_URL&connect_token=CT - After they pick a page, Late saves the connection and finally redirects to your
redirect_url(if provided)
Headless/Whitelabel Mode (Facebook, LinkedIn & Google Business Profile): Build your own fully branded selection UI while Late handles OAuth:
Facebook:
- Call this endpoint with your API key and add
&headless=true, e.g.
GET /v1/connect/facebook?profileId=PROFILE_ID&redirect_url=https://yourapp.com/callback&headless=true - Redirect your user to the returned
authUrl - After OAuth, the user is redirected directly to your
redirect_urlwith:profileId– your Late profile IDtempToken– temporary Facebook access tokenuserProfile– URL‑encoded JSON user profileconnect_token– short‑lived connect token (for API auth)platform=facebookstep=select_page
- Use
tempToken,userProfile, and theX-Connect-Tokenheader with:GET /v1/connect/facebook/select-pageto fetch pagesPOST /v1/connect/facebook/select-pageto save the selected page
- In this mode, users never see Late's hosted page selector – only your UI.
LinkedIn:
- Call this endpoint with
&headless=true, e.g.
GET /v1/connect/linkedin?profileId=PROFILE_ID&redirect_url=https://yourapp.com/callback&headless=true - Redirect your user to the returned
authUrl - After OAuth, the user is redirected directly to your
redirect_urlwith:profileId– your Late profile IDtempToken– temporary LinkedIn access tokenuserProfile– URL‑encoded JSON withid,username,displayName,profilePictureorganizations– URL‑encoded JSON array withid,urn,namefor each org (logos not included to prevent URL length issues)connect_token– short‑lived connect token (for API auth)platform=linkedinstep=select_organization
- The
organizationsarray contains minimal data (id,urn,name). Use it to build your selection UI. - Optional: To fetch full organization details (logos, vanityName, website, industry, description), call
GET /v1/connect/linkedin/organizations?tempToken=X&orgIds=id1,id2,... - Call
POST /v1/connect/linkedin/select-organizationwith theX-Connect-Tokenheader to save the selection. - In this mode, users never see Late's hosted organization selector – only your UI.
- Note: If the user has no organization admin access,
step=select_organizationwill NOT be present, and the account will be connected directly as a personal account.
Google Business Profile:
- Call this endpoint with
&headless=true, e.g.
GET /v1/connect/googlebusiness?profileId=PROFILE_ID&redirect_url=https://yourapp.com/callback&headless=true - Redirect your user to the returned
authUrl - After OAuth, the user is redirected directly to your
redirect_urlwith:profileId– your Late profile IDtempToken– temporary Google access tokenuserProfile– URL‑encoded JSON user profile (includes refresh token info)connect_token– short‑lived connect token (for API auth)platform=googlebusinessstep=select_location
- Use
tempToken,userProfile, and theX-Connect-Tokenheader with:GET /v1/connect/googlebusiness/locationsto fetch business locationsPOST /v1/connect/googlebusiness/select-locationto save the selected location
- In this mode, users never see Late's hosted location selector – only your UI.
Supported platforms: facebook, instagram, linkedin, twitter, tiktok, youtube, threads, reddit, pinterest, bluesky
API key authentication - use your Late API key as a Bearer token
In: header
Path Parameters
Social media platform to connect
"facebook" | "instagram" | "linkedin" | "twitter" | "tiktok" | "youtube" | "threads" | "reddit" | "pinterest" | "bluesky" | "googlebusiness"Query Parameters
Your Late profile ID (get from /v1/profiles)
Optional: Your custom redirect URL after connection completes.
Standard Mode: Omit headless=true to use our hosted page selection UI.
After the user selects a Facebook Page, Late redirects here with:
?connected=facebook&profileId=X&username=Y
Headless Mode (Facebook, LinkedIn & Google Business Profile):
Pass headless=true as a query parameter on this endpoint (not inside redirect_url), e.g.:
GET /v1/connect/facebook?profileId=PROFILE_ID&redirect_url=https://yourapp.com/callback&headless=true
GET /v1/connect/linkedin?profileId=PROFILE_ID&redirect_url=https://yourapp.com/callback&headless=true
GET /v1/connect/googlebusiness?profileId=PROFILE_ID&redirect_url=https://yourapp.com/callback&headless=true
After OAuth, the user is redirected directly to your redirect_url with OAuth data:
- Facebook:
?profileId=X&tempToken=Y&userProfile=Z&connect_token=CT&platform=facebook&step=select_page - LinkedIn:
?profileId=X&tempToken=Y&userProfile=Z&organizations=ORGS&connect_token=CT&platform=linkedin&step=select_organization(organizations containsid,urn,nameonly - use/v1/connect/linkedin/organizationsto fetch full details) - Google Business:
?profileId=X&tempToken=Y&userProfile=Z&connect_token=CT&platform=googlebusiness&step=select_location
Then use the respective endpoints to build your custom UI:
- Facebook:
/v1/connect/facebook/select-page(GET to fetch, POST to save) - LinkedIn:
/v1/connect/linkedin/organizations(GET to fetch logos),/v1/connect/linkedin/select-organization(POST to save) - Google Business:
/v1/connect/googlebusiness/locations(GET) and/v1/connect/googlebusiness/select-location(POST)
Example: https://yourdomain.com/integrations/callback
uriResponse Body
application/json
application/json
curl -X GET "https://getlate.dev/api/v1/connect/facebook?profileId=string"{
"authUrl": "https://www.facebook.com/v21.0/dialog/oauth?client_id=...",
"state": "user123-profile456-1234567890-https://yourdomain.com/callback"
}{
"error": "Unauthorized"
}Complete OAuth token exchange manually (for server-side flows)
API key authentication - use your Late API key as a Bearer token
In: header
Path Parameters
Response Body
application/json
curl -X POST "https://getlate.dev/api/v1/connect/string" \ -H "Content-Type: application/json" \ -d '{ "code": "string", "state": "string", "profileId": "string" }'{
"error": "Unauthorized"
}List Facebook Pages after OAuth (Headless Mode)
Headless Mode for Custom UI
After initiating Facebook OAuth via /v1/connect/facebook, you'll be redirected to
/connect/facebook/select-page with query params including tempToken and userProfile.
For a headless/whitelabeled flow, extract these params from the URL and call this endpoint to retrieve the list of Facebook Pages the user can manage. Then build your own UI to let users select a page.
Note: Use the X-Connect-Token header if you initiated the connection via API key
(rather than a browser session).
API key authentication - use your Late API key as a Bearer token
In: header
Query Parameters
Profile ID from your connection flow
Temporary Facebook access token from the OAuth callback redirect
Response Body
application/json
application/json
application/json
curl -X GET "https://getlate.dev/api/v1/connect/facebook/select-page?profileId=string&tempToken=string"{
"pages": [
{
"id": "123456789",
"name": "My Brand Page",
"username": "mybrand",
"access_token": "EAAxxxxx...",
"category": "Brand",
"tasks": [
"MANAGE",
"CREATE_CONTENT"
]
}
]
}{
"error": "Unauthorized"
}{
"error": "string"
}Select a Facebook Page to complete the connection (Headless Mode)
Complete the Headless Flow
After displaying your custom UI with the list of pages from the GET endpoint, call this endpoint to finalize the connection with the user's selected page.
The userProfile should be the decoded JSON object from the userProfile query param
in the OAuth callback redirect URL.
Note: Use the X-Connect-Token header if you initiated the connection via API key.
API key authentication - use your Late API key as a Bearer token
In: header
Profile ID from your connection flow
The Facebook Page ID selected by the user
Temporary Facebook access token from OAuth
Decoded user profile object from the OAuth callback
Optional custom redirect URL to return to after selection
uriResponse Body
application/json
application/json
curl -X POST "https://getlate.dev/api/v1/connect/facebook/select-page" \ -H "Content-Type: application/json" \ -d '{ "profileId": "507f1f77bcf86cd799439011", "pageId": "123456789", "tempToken": "EAAxxxxx...", "userProfile": { "id": "987654321", "name": "John Doe", "profilePicture": "https://..." }, "redirect_url": "https://yourdomain.com/integrations/callback" }'{
"message": "Facebook page connected successfully",
"redirect_url": "https://yourdomain.com/integrations/callback?connected=facebook&profileId=507f1f77bcf86cd799439011&username=My+Brand+Page",
"account": {
"platform": "facebook",
"username": "mybrand",
"displayName": "My Brand Page",
"profilePicture": "https://...",
"isActive": true,
"selectedPageName": "My Brand Page"
}
}{
"error": "Unauthorized"
}List Google Business Locations after OAuth (Headless Mode)
Headless Mode for Custom UI
After initiating Google Business OAuth via /v1/connect/googlebusiness?headless=true, you'll be redirected
to your redirect_url with query params including tempToken and userProfile.
For a headless/whitelabeled flow, extract these params from the URL and call this endpoint to retrieve the list of Google Business locations the user can manage. Then build your own UI to let users select a location.
Note: Use the X-Connect-Token header if you initiated the connection via API key
(rather than a browser session).
API key authentication - use your Late API key as a Bearer token
In: header
Query Parameters
Profile ID from your connection flow
Temporary Google access token from the OAuth callback redirect
Response Body
application/json
application/json
application/json
curl -X GET "https://getlate.dev/api/v1/connect/googlebusiness/locations?profileId=string&tempToken=string"{
"locations": [
{
"id": "9281089117903930794",
"name": "My Coffee Shop",
"accountId": "accounts/113303573364907650416",
"accountName": "My Business Account",
"address": "123 Main St, City, Country",
"category": "Coffee shop"
}
]
}{
"error": "Unauthorized"
}{
"error": "string"
}Select a Google Business location to complete the connection (Headless Mode)
Complete the Headless Flow
After displaying your custom UI with the list of locations from the GET /v1/connect/googlebusiness/locations
endpoint, call this endpoint to finalize the connection with the user's selected location.
The userProfile should be the decoded JSON object from the userProfile query param
in the OAuth callback redirect URL. It contains important token information (including refresh token).
Note: Use the X-Connect-Token header if you initiated the connection via API key.
API key authentication - use your Late API key as a Bearer token
In: header
Profile ID from your connection flow
The Google Business location ID selected by the user
Temporary Google access token from OAuth
Decoded user profile object from the OAuth callback. Important: This contains the refresh token needed for token refresh. Always include this field.
Optional custom redirect URL to return to after selection
uriResponse Body
application/json
application/json
curl -X POST "https://getlate.dev/api/v1/connect/googlebusiness/select-location" \ -H "Content-Type: application/json" \ -d '{ "profileId": "507f1f77bcf86cd799439011", "locationId": "9281089117903930794", "tempToken": "ya29.xxxxx...", "userProfile": { "id": "113303573364907650416", "name": "John Doe", "refreshToken": "1//0gxxxxx...", "tokenExpiresIn": 3599, "scope": "https://www.googleapis.com/auth/business.manage" }, "redirect_url": "https://yourdomain.com/integrations/callback" }'{
"message": "Google Business location connected successfully",
"redirect_url": "https://yourdomain.com/integrations/callback?connected=googlebusiness&profileId=507f1f77bcf86cd799439011&username=My+Coffee+Shop",
"account": {
"platform": "googlebusiness",
"username": "My Coffee Shop",
"displayName": "My Coffee Shop",
"isActive": true,
"selectedLocationName": "My Coffee Shop",
"selectedLocationId": "9281089117903930794"
}
}{
"error": "Unauthorized"
}Fetch full LinkedIn organization details (Headless Mode)
Fetch Full Organization Details for Custom UI
After LinkedIn OAuth in headless mode, the redirect URL contains organization data with only
id, urn, and name fields (additional details are excluded to prevent URL length issues with many organizations).
Use this endpoint to fetch full organization details including logos, vanity names, websites, and more if you want to display them in your custom selection UI.
Note: This endpoint requires no authentication - just the tempToken from the OAuth redirect.
Details are fetched directly from LinkedIn's API in parallel for fast response times.
API key authentication - use your Late API key as a Bearer token
In: header
Query Parameters
The temporary LinkedIn access token from the OAuth redirect
Comma-separated list of organization IDs to fetch details for (max 100)
Response Body
application/json
application/json
curl -X GET "https://getlate.dev/api/v1/connect/linkedin/organizations?tempToken=string&orgIds=12345678%2C87654321%2C11111111"{
"organizations": [
{
"id": "12345678",
"logoUrl": "https://media.licdn.com/dms/image/v2/...",
"vanityName": "acme-corp",
"website": "https://acme.com",
"industry": "Technology",
"description": "Leading provider of innovative solutions"
},
{
"id": "87654321",
"logoUrl": "https://media.licdn.com/dms/image/v2/...",
"vanityName": "example-inc",
"website": "https://example.com"
},
{
"id": "11111111"
}
]
}{
"error": "Missing tempToken parameter"
}Select LinkedIn organization or personal account after OAuth
Complete the LinkedIn Connection Flow
After OAuth, the user is redirected with organizations in the URL params (if they have org admin access).
The organizations array contains id, urn, and name fields. Use this data to build your UI,
then call this endpoint to save the selection.
Set accountType to personal to connect as the user's personal LinkedIn profile, or
organization to connect as a company page (requires selectedOrganization object).
Headless Mode: Use the X-Connect-Token header if you initiated the connection via API key.
API key authentication - use your Late API key as a Bearer token
In: header
"personal" | "organization"uriResponse Body
application/json
application/json
curl -X POST "https://getlate.dev/api/v1/connect/linkedin/select-organization" \ -H "Content-Type: application/json" \ -d '{ "profileId": "64f0a1b2c3d4e5f6a7b8c9d0", "tempToken": "AQX...", "userProfile": { "id": "abc123", "username": "johndoe", "displayName": "John Doe", "profilePicture": "https://media.licdn.com/dms/image/v2/..." }, "accountType": "organization", "selectedOrganization": { "id": "12345678", "urn": "urn:li:organization:12345678", "name": "Acme Corporation" }, "redirect_url": "https://yourapp.com/callback" }'{
"message": "LinkedIn account connected successfully",
"account": {
"_id": "64e1f0a9e2b5af0012ab34cd",
"platform": "linkedin",
"profileId": "64f0a1b2c3d4e5f6a7b8c9d0",
"username": "acme-corp",
"displayName": "Acme Corporation",
"isActive": true
}
}{
"error": "Unauthorized"
}Connect Bluesky using app password
Connect a Bluesky account using identifier (handle or email) and an app password.
To get your userId for the state parameter, call GET /v1/users - the response includes a currentUserId field.
API key authentication - use your Late API key as a Bearer token
In: header
Your Bluesky handle (e.g. user.bsky.social) or email address
App password generated from Bluesky Settings > App Passwords
Required state parameter formatted as {userId}-{profileId}.
userId: Your Late user ID (get fromGET /v1/users→currentUserId)profileId: The profile ID to connect the account to (get fromGET /v1/profiles)
Optional URL to redirect to after successful connection
uriResponse Body
application/json
application/json
curl -X POST "https://getlate.dev/api/v1/connect/bluesky/credentials" \ -H "Content-Type: application/json" \ -d '{ "identifier": "yourhandle.bsky.social", "appPassword": "xxxx-xxxx-xxxx-xxxx", "state": "6507a1b2c3d4e5f6a7b8c9d0-6507a1b2c3d4e5f6a7b8c9d1", "redirectUri": "https://yourapp.com/connected" }'{
"message": "Bluesky account connected successfully",
"account": {
"_id": "64e1f0a9e2b5af0012ab34cd",
"platform": "bluesky",
"profileId": "64f0a1b2c3d4e5f6a7b8c9d0",
"username": "yourhandle.bsky.social",
"displayName": "Your Name",
"isActive": true
}
}{
"error": "Unauthorized"
}Update selected Facebook page for a connected account
API key authentication - use your Late API key as a Bearer token
In: header
Path Parameters
Response Body
application/json
application/json
curl -X PUT "https://getlate.dev/api/v1/accounts/string/facebook-page" \ -H "Content-Type: application/json" \ -d '{ "selectedPageId": "123456789012345" }'{
"message": "Facebook page updated successfully",
"account": {
"_id": "64e1f0a9e2b5af0012ab34cd",
"platform": "facebook",
"username": "mybrand",
"displayName": "My Brand Page",
"isActive": true
}
}{
"error": "Unauthorized"
}Get available LinkedIn organizations for a connected account
API key authentication - use your Late API key as a Bearer token
In: header
Path Parameters
Response Body
application/json
application/json
curl -X GET "https://getlate.dev/api/v1/accounts/string/linkedin-organizations"{
"organizations": [
{
"id": "12345678",
"name": "Acme Corporation",
"vanityName": "acme-corp",
"localizedName": "Acme Corporation"
},
{
"id": "87654321",
"name": "Acme Subsidiary",
"vanityName": "acme-sub",
"localizedName": "Acme Subsidiary"
}
]
}{
"error": "Unauthorized"
}Switch LinkedIn account type (personal/organization)
API key authentication - use your Late API key as a Bearer token
In: header
Path Parameters
"personal" | "organization"Response Body
application/json
application/json
curl -X PUT "https://getlate.dev/api/v1/accounts/string/linkedin-organization" \ -H "Content-Type: application/json" \ -d '{ "accountType": "organization", "selectedOrganization": { "id": "12345678", "name": "Acme Corporation", "vanityName": "acme-corp" } }'{
"message": "LinkedIn account type updated successfully",
"account": {
"_id": "64e1f0a9e2b5af0012ab34cd",
"platform": "linkedin",
"username": "acme-corp",
"displayName": "Acme Corporation",
"isActive": true
}
}{
"error": "Unauthorized"
}List Pinterest boards for a connected account
API key authentication - use your Late API key as a Bearer token
In: header
Path Parameters
Response Body
application/json
application/json
curl -X GET "https://getlate.dev/api/v1/accounts/string/pinterest-boards"{
"boards": [
{
"id": "123456789012345678",
"name": "Marketing Ideas",
"description": "Collection of marketing inspiration",
"privacy": "PUBLIC"
},
{
"id": "234567890123456789",
"name": "Product Photos",
"description": "Product photography",
"privacy": "PUBLIC"
}
]
}{
"error": "Unauthorized"
}Set default Pinterest board on the connection
API key authentication - use your Late API key as a Bearer token
In: header
Path Parameters
Response Body
application/json
application/json
curl -X PUT "https://getlate.dev/api/v1/accounts/string/pinterest-boards" \ -H "Content-Type: application/json" \ -d '{ "defaultBoardId": "123456789012345678", "defaultBoardName": "Marketing Ideas" }'{
"message": "Default Pinterest board updated successfully",
"account": {
"_id": "64e1f0a9e2b5af0012ab34cd",
"platform": "pinterest",
"username": "mybrand",
"displayName": "My Brand",
"isActive": true
}
}{
"error": "Unauthorized"
}List Reddit subreddits for a connected account
API key authentication - use your Late API key as a Bearer token
In: header
Path Parameters
Response Body
application/json
application/json
curl -X GET "https://getlate.dev/api/v1/accounts/string/reddit-subreddits"{
"subreddits": [
{
"name": "marketing",
"displayName": "r/marketing",
"subscribers": 456000,
"public_description": "A place to discuss marketing strategies"
},
{
"name": "socialmedia",
"displayName": "r/socialmedia",
"subscribers": 234000,
"public_description": "Social media marketing discussions"
}
]
}{
"error": "Unauthorized"
}Set default subreddit on the connection
API key authentication - use your Late API key as a Bearer token
In: header
Path Parameters
Response Body
application/json
application/json
curl -X PUT "https://getlate.dev/api/v1/accounts/string/reddit-subreddits" \ -H "Content-Type: application/json" \ -d '{ "defaultSubreddit": "marketing" }'{
"message": "Default subreddit updated successfully",
"account": {
"_id": "64e1f0a9e2b5af0012ab34cd",
"platform": "reddit",
"username": "u/myuser",
"displayName": "My Reddit Account",
"isActive": true
}
}{
"error": "Unauthorized"
}Clone an existing connection to this profile with optional targeting
Reuse an existing OAuth connection from another profile in this profile, optionally targeting different pages (Facebook) or organizations (LinkedIn). Perfect for managing multiple brands with the same underlying social media account.
API key authentication - use your Late API key as a Bearer token
In: header
Path Parameters
ID of existing connection to clone
Facebook page ID to target (optional, for Facebook)
Facebook page name (optional, for Facebook)
Facebook page access token (optional, for Facebook)
LinkedIn organization ID (optional, for LinkedIn)
LinkedIn organization URN (optional, for LinkedIn)
LinkedIn organization name (optional, for LinkedIn)
LinkedIn account type (optional, for LinkedIn)
"personal" | "organization"Response Body
application/json
application/json
curl -X POST "https://getlate.dev/api/v1/profiles/string/clone-connection" \ -H "Content-Type: application/json" \ -d '{ "sourceAccountId": "64e1f0a9e2b5af0012ab34cd" }'{
"message": "Connection cloned successfully",
"connection": {
"_id": "64e1f0a9e2b5af0012ab34ce",
"platform": "twitter",
"profileId": "64f0a1b2c3d4e5f6a7b8c9d1",
"username": "@acmecorp",
"displayName": "Acme Corporation",
"isActive": true
}
}{
"error": "Unauthorized"
}