v1Resources/Connections/getGet a Facebook connect URL

Get a Facebook connect URL

Returns a Facebook OAuth authorize URL to open in a browser to connect this location's Facebook Page. This endpoint can't complete the connection itself — Facebook's consent screen requires an interactive human.

get/api/v1/connections/facebook/connect-url
connections:write
Query parameters
locationIdstringrequired
The location to connect.
clientIdstringoptional
The location's client. Only needed to disambiguate when your key is scoped to specific clients.
returnUrlstringoptional
In-app path to land on after the human completes the consent screen. Defaults to "/".
successUrlstringoptional
Where the customer's browser is sent after a successful connect. Must be registered on the API key, and supplied together with errorUrl.
errorUrlstringoptional
Where the browser is sent if the connect fails or is cancelled. Same registration rule, and supplied together with successUrl.
Response
dataobjectoptional
providerstring (google | facebook | apple)optional
Which publisher this URL connects: google, facebook, or apple.
locationIdstringoptional
The location this connection pairs to, or null when the connect was started with a clientId.
clientIdstringoptional
The client this connection is scoped to, or null.
urlstringoptional
The authorize URL — open it in a browser under the account owner's control.
successUrlstringoptional
The successUrl used for this call, or null in legacy mode.
errorUrlstringoptional
The errorUrl used for this call, or null in legacy mode.
notestringoptional
Guidance for opening the URL. Explains the partner handoff when successUrl and errorUrl are set, or the poll GET /api/v1/connections flow otherwise.
Errors
400The request is missing a required parameter or is otherwise malformed.
401Missing, invalid, expired, or revoked API key.
403The key lacks the required scope, or isn't authorized for this client/location.
429Too many requests. Retry after the number of seconds in the Retry-After header.
get/api/v1/connections/facebook/connect-url
Your API key
locationId *
clientId
returnUrl
successUrl
errorUrl
{
  "data": {
    "provider": "facebook",
    "locationId": "loc_456",
    "clientId": null,
    "url": "https://www.facebook.com/v19.0/dialog/oauth?client_id=...&redirect_uri=...&scope=...&state=...&response_type=code",
    "successUrl": null,
    "errorUrl": null,
    "note": "Open this URL in a browser under the account owner's control. There is no callback to your integration. Once approved, poll GET /api/v1/connections to see the new connection. Pass successUrl and errorUrl (registered on this key) to have the browser sent back to you with a one-time code instead."
  }
}

Guides that use this resource