English
English
Appearance
English
English
Appearance
/public/account/facebook/connectLink a selected Facebook Page to your workspace using its page ID and access token.
Authorization: Basic Base64(AccessKey:SecretKey))| Field | Type | Required | Description |
|---|---|---|---|
pageId | string | Yes | The unique identifier of the Facebook Page to connect. |
token | string | Yes | Access token received from the exchange step. |
curl -X POST "https://api.repliz.com/public/account/facebook/connect" \
-H "Authorization: Basic $(echo -n 'YOUR_ACCESS_KEY:YOUR_SECRET_KEY' | base64)" \
-H "Content-Type: application/json" \
-d '{"pageId":"113958387982006","token":"EAAGxxxxxxxx"}'import axios from 'axios';
const response = await axios.post(
'https://api.repliz.com/public/account/facebook/connect',
{
pageId: '113958387982006',
token: 'EAAGxxxxxxxx',
},
{
auth: {
username: 'YOUR_ACCESS_KEY',
password: 'YOUR_SECRET_KEY',
},
},
);
console.log(response.data);const credentials = btoa('YOUR_ACCESS_KEY:YOUR_SECRET_KEY');
const response = await fetch(
'https://api.repliz.com/public/account/facebook/connect',
{
method: 'POST',
headers: {
Authorization: `Basic ${credentials}`,
'Content-Type': 'application/json',
},
body: JSON.stringify({
pageId: '113958387982006',
token: 'EAAGxxxxxxxx',
}),
},
);
const data = await response.json();
console.log(data);{
"accountId": "680affa5ce12f2f72916f67e"
}{
"code": 401,
"message": "unauthorized"
}