Connect Account (Step 3 of 3)
POST/social-media-posting/oauth/:locationId/:platform/accounts/:accountId
OAuth Connection Flow - Step 3: Connect the Account
This is the final step in the OAuth flow. After retrieving available accounts (Step 2), use this endpoint to connect the selected account to your location.
OAuth Flow Summary
- Start OAuth → User authenticates with platform
- Get Accounts → Retrieved available pages/channels
- Attach Account (this endpoint) → Connect the selected account
Request Body by Platform
The request body structure varies depending on the platform:
Facebook / Instagram
{
"type": "page",
"originId": "244405XXXXX11687",
"name": "My Facebook Page",
"avatar": "https://..." // optional
}
Google Business Profile
{
"location": {
"name": "locations/12345",
"title": "My Business Location",
"storeCode": "STORE123",
"isVerified": "ChIJsZQpj1qbXjkRQNDUG4UUx6k"
},
"account": {
"name": "accounts/12345",
"accountName": "My Business Account",
"type": "LOCATION_GROUP",
"verificationState": "VERIFIED",
"vettedState": "VETTED"
}
}
LinkedIn
{
"type": "page",
"originId": "urn:li:organization:12345",
"name": "My LinkedIn Page",
"avatar": "https://..." // optional
}
TikTok
{
"originId": "7234567890123456789",
"name": "My TikTok Account",
"avatar": "https://..." // optional
}
YouTube
{
"originId": "UCxxxxxxxxxxxxxxxx",
"name": "My YouTube Channel",
"avatar": "https://..." // optional
}
Pinterest
{
"originId": "123456789",
"name": "My Pinterest Account",
"avatar": "https://..." // optional
}
After Connection
Once connected, the account will appear in your location's connected accounts and can be used for social media posting.
Request
Responses
- 201
- 400
- 401
- 422
Successful response - Account attached. Response structure varies by platform.
Bad Request
Unauthorized
Unprocessable Entity