Method: GET
Endpoint: /api/getFBLAccounts
Parameters
Parameter |
Type |
Required |
Description |
id |
int |
No |
FBL Account id which account you want to get |
limit_start |
int (default: 0) |
No |
Starting row of result. Default: 0 |
limit_count |
int (default: 25) |
No |
Number of records to get. Default: 25 |
Response Parameters
Parameter |
Type |
Description |
status |
JSON |
Success or Error |
result |
JSON |
Result of the operation |
response |
JSON |
Output of the operation |
Example Request (CURL)
<?php
// Authentication
$api_token = 'API_KEY'; // Mumara API Key (can be found in Settings -> API Key)
$domain = 'http://www.anydomain.com'; // Your Mumara Domain Name
// API Endpoint
$endpoint = '/api/getFBLAccounts';
//parameters
$data = array (
'limit_start' => '1',
'limit_count' => '2'
);
$params = '';
foreach($data as $key=>$value)
$params .= $key.'='.$value.'&';
$params = trim($params, '&');
// Defining cURL Request
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL,$domain.$endpoint.'?'.$params);
curl_setopt($ch, CURLOPT_HTTPHEADER,
array('Content-Type: application/json', 'Authorization: Bearer ' . $api_token));
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
// Executing cURL
$output = curl_exec ($ch);
// Printing Output
echo "<pre>";
echo json_encode(json_decode($output),JSON_PRETTY_PRINT );
// Closing cURL
curl_close ($ch);
?>
Example Response (JSON)
{
"status": "success",
"result": [
{
"id": 13,
"name": "[email protected]",
"host": "hostings.house",
"port": 110,
"username": "[email protected]",
"password": "eyJpdiI6InBBSU80MHNjYWRJYnRvUXVtcG10VWc9PSIsInZhbHVlIjoiOWc0d1ZqZitNTytYQmRWYjUrVFwvdFEya1l0cnpVNW11b3BadWVKOTdGRHM9IiwibWFjIjoiNjI2YzYxOWQ0MWMzOGNkZTJlNTI4NzRmMjUwYWU4N2JhYzFjMDExNWRkMGI2ZDRjZmE1YTgyZTYzNDQwZjY3NyJ9",
"folder": "INBOX",
"validate_certificates": 1,
"fbl_encryption": null,
"delete_emails": 0,
"processing_protocols": "pop",
"user_id": 2,
"complaints": 5,
"status": "inactive",
"error": "Connectivity Error",
"created_at": "2020-08-05 14:35:47",
"updated_at": "2020-10-02 15:01:13"
},
{
"id": 14,
"name": "[email protected]",
"host": "hostings.house",
"port": 110,
"username": "[email protected]",
"password": "eyJpdiI6IjFxUmN5a0I0UWNTdEk1b3NpTk9tbFE9PSIsInZhbHVlIjoieEtxd3N5Z2hZQTl0UnR3UCtLalwvV05IckVKRmhqU1pzY1FuQ0dObEhOYVk9IiwibWFjIjoiNDA4NGFlNjBlMGU2N2M2MmZlYmE2MDhjOGFkNjUyNmE4YmZjOWI0MGI5ZmMxMmRlMWU0MGFhZjViNmNlNTllNyJ9",
"folder": "INBOX",
"validate_certificates": 0,
"fbl_encryption": null,
"delete_emails": 0,
"processing_protocols": "pop",
"user_id": 2,
"complaints": 0,
"status": "active",
"error": "Connectivity Error",
"created_at": "2020-08-27 14:38:11",
"updated_at": "2020-10-12 12:00:34"
}
]
}
Status value of the success response will be "Success"
Example Error Response (JSON)
{
"status": "error",
"result": "Error: FBL Account does not exist."
}
Possible Errors
- FBL Account does not exist.
- Access Denied