Appearance
Get Page Facebook
GET/public/account/facebook/pageRetrieve a list of Facebook Pages the authorized user has access to. Use the access token obtained from the exchange step.
Endpoint Details
- Authentication: Basic Auth (
Authorization: Basic Base64(AccessKey:SecretKey)) - Access Tier: Gold+
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
token | string | Yes | Access token obtained from the exchange endpoint. |
Example Request
bash
curl -X GET "https://api.repliz.com/public/account/facebook/page?token=YOUR_TOKEN" \
-H "Authorization: Basic $(echo -n 'YOUR_ACCESS_KEY:YOUR_SECRET_KEY' | base64)"javascript
import axios from 'axios';
const response = await axios.get('https://api.repliz.com/public/account/facebook/page', {
params: {
token: 'YOUR_TOKEN'
},
auth: {
username: 'YOUR_ACCESS_KEY',
password: 'YOUR_SECRET_KEY'
}
});
console.log(response.data);javascript
const credentials = btoa('YOUR_ACCESS_KEY:YOUR_SECRET_KEY');
const response = await fetch('https://api.repliz.com/public/account/facebook/page?token=YOUR_TOKEN', {
headers: {
'Authorization': `Basic ${credentials}`
}
});
const data = await response.json();
console.log(data);Response
json
{
"docs": [
{
"id": "113958387982006",
"name": "Halaman ke 3",
"username": "Kafe",
"picture": "https://scontent.fbdo9-1.fna.fbcdn.net/v/t39.30808-1/281663458_11395844131533...",
"token": "YOUR_PAGE_ACCESS_TOKEN"
}
]
}json
{
"code": 401,
"message": "unauthorized"
}