Accounts
Resource Fields
Metadata
Version | 1.0 |
Last Updated | July 04, 2016 |
Actions
Retrieve all accounts
GET /api/v1/facebook/accounts.jsonInformation
Allowed for | Collaborators, Agents, Admins & Owners |
Ordered by | id (ascending) |
Response
{
"status": 200,
"data": [
{
"id": 1,
"account_id": "1399177110403746",
"title": "Brewfictus",
"profile_image_url": null,
"status": "AVAILABLE",
"created_at": "2015-07-26T06:40:32+05:00",
"updated_at": "2015-07-26T06:40:32+05:00",
"resource_type": "facebook_account"
,"resource_url": "https://brewfictus.kayako.com/api/v1/facebook/accounts/1"
}
],
"resource": "facebook_account",
"offset": 0,
"limit": 10,
"total_count": 1
}
Retrieve an account
GET /api/v1/facebook/accounts/:id.jsonInformation
Allowed for | Collaborators, Agents, Admins & Owners |
Response
{
"status": 200,
"data": {
"id": 1,
"account_id": "1399177110403746",
"title": "Brewfictus",
"profile_image_url": null,
"status": "AVAILABLE",
"created_at": "2015-07-26T06:40:32+05:00",
"updated_at": "2015-07-26T06:40:32+05:00",
"resource_type": "facebook_account"
,"resource_url": "https://brewfictus.kayako.com/api/v1/facebook/accounts/1"
}
,
"resource": "facebook_account"
}
Add an account
RESOURCE FIELDS
Name | Type | Read-only | Description |
---|---|---|---|
link | string |
Retrieve link
GET /api/v1/facebook/account/link.jsonInformation
Allowed for | Admins & Owners |
Arguments
Name | Type | Mandatory | Description |
---|---|---|---|
callback | string | The callback URL where Facebook will be redirected to. Example: /Helpcenter/home/index |
Response
{
"status": 200,
"data": {
"link": "https://www.facebook.com/v2.2/dialog/oauth?client_id=797588383662629&redirect_uri=https://brewfictus.kayako.com&state=3b6d967fa98ae2290b5e4c4b22a89e10&sdk=php-sdk-4.0.18&scope=read_mailbox"
},
"resource": "oauth_link"
}
Callback handler
GET /api/v1/facebook/account/callback.jsonInformation
Allowed for | Admins & Owners |
Arguments
Name | Type | Mandatory | Description |
---|---|---|---|
callback | string | callback should be same as used in to retrieve link | |
code | string | The Facebook code that appears in the querystring | |
state | string | The Facebook state that appears in the querystring |
Response
{
"status": 201,
"data": {
"id": 1,
"account_id": "1399177110403746",
"title": "Brewfictus",
"profile_image_url": null,
"status": "AVAILABLE",
"created_at": "2015-07-26T06:40:32+05:00",
"updated_at": "2015-07-26T06:40:32+05:00",
"resource_type": "facebook_account"
,"resource_url": "https://brewfictus.kayako.com/api/v1/facebook/accounts/1"
}
,
"resource": "facebook_account_callback"
}