To retrieve all currently connected social media profiles, make a GET call to the /social/profiles endpoint. A profile represents a Business Page, Company Page, or social network account that the user has authorized for posting (for example, a Facebook Page or an Instagram Business profile).
Parameters
include(string, optional): Sub-resources to include in the response. Set toaccessibleto also check whether each profile is currently accessible for posting on its network and to include any network-specificsettings(for example, TikTok constraints).
Example Request
GET https://api.cc.email/v3/social/profiles
Endpoint Requirements
User privileges: campaign:read
Authorization scopes: campaign_data
<?php
$curl = curl_init();
curl_setopt_array($curl, array(
CURLOPT_URL => 'https://api.cc.email/v3/social/profiles',
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => '',
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 0,
CURLOPT_FOLLOWLOCATION => true,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => 'GET',
CURLOPT_HTTPHEADER => array(
'Content-Type: application/json',
'Authorization: Bearer {access_token}'
),
));
$response = curl_exec($curl);
curl_close($curl);
echo $response;
curl --location 'https://api.cc.email/v3/social/profiles' \
--header 'Content-Type: application/json' \
--header 'Authorization: Bearer {access_token}'
OkHttpClient client = new OkHttpClient().newBuilder().build();
Request request = new Request.Builder()
.url("https://api.cc.email/v3/social/profiles")
.get()
.addHeader("Content-Type", "application/json")
.addHeader("Authorization", "Bearer {access_token}")
.build();
Response response = client.newCall(request).execute();
Example Response
The response is a JSON array of profile objects. Pass the profile_id of any returned profile to Create a Social Media Post to publish a post to that destination.
[
{
"profile_id": "5ad6d481-0744-4020-8a5d-50cb5434d4f1",
"name": "My Business Page",
"network": "facebook",
"connected": true,
"image_url": "https://example.com/profile-image.jpg",
"url": "https://www.facebook.com/mybusinesspage",
"network_profile_id": "643431902197168",
"network_user_id": "24258109677114580",
"account_info": {
"display_name": "Jane Doe",
"username": "Jane Doe",
"image_url": "https://graph.facebook.com/24258109677114580/picture"
}
},
{
"profile_id": "2e85c644-6602-48ce-9d8f-ba632b35867b",
"name": "mybusinesspage",
"network": "instagram",
"handle": "mybusinesspage",
"connected": true,
"image_url": "https://example.com/instagram-image.jpg",
"network_profile_id": "17841475595296980"
}
]
Test the endpoint using our reference tester: Try it!