Get a Collection of Social Network Connections
To retrieve all currently connected social network accounts, make a GET call to the /social/connections endpoint. The response includes account info and a connection_status for each connection. You can surface this information in your UI to show users the current state of each network — for example, when a token has expired, scopes are missing, or the connection is rate-limited. Note that a broken connection cannot be repaired through this API; the end user must reconnect the network from within Constant Contact.
A connection represents an authorized link to a social network account (for example, a Facebook user account or an Instagram business account). Multiple profiles (Pages, Business accounts, and so on) can exist under a single connection.
Example Request
https://api.cc.email/v3/social/connectionsEndpoint Requirements
User privileges: campaign:readAuthorization scopes: campaign_dataOkHttpClient client = new OkHttpClient().newBuilder().build();
Request request = new Request.Builder()
.url("https://api.cc.email/v3/social/connections")
.get()
.addHeader("Content-Type", "application/json")
.addHeader("Authorization", "Bearer {access_token}")
.build();
Response response = client.newCall(request).execute();Example Response
The response wraps the list of connections under a connections array. Each entry contains the connected account_info and a connection_status object describing the current state of the connection.
{
"connections": [
{
"account_info": {
"network": "facebook",
"network_account_id": "24258109677114580",
"display_name": "Jane Doe",
"username": "Jane Doe",
"image_url": "https://graph.facebook.com/24258109677114580/picture?type=large"
},
"connection_status": {
"has_token": true,
"is_active_user": true,
"rate_limited": false,
"token_has_scopes": true,
"token_is_valid": true
}
},
{
"account_info": {
"network": "instagram",
"network_account_id": "17841475595296980",
"display_name": "mybusinesspage",
"username": "mybusinesspage",
"account_url": "https://instagram.com/mybusinesspage/"
},
"connection_status": {
"has_token": true,
"is_active_user": true,
"rate_limited": false,
"token_has_scopes": true,
"token_is_valid": true
}
}
]
}If connection_status.token_is_valid is false or connection_status.rate_limited is true, the user must re-authorize or wait before publishing succeeds for that network.
Test the endpoint using our reference tester:
Try it!