Accounts

Resource Fields

Name Type Read-only Description
account_id string
title string
profile_image_url string
status string AVAILABLE, UNAVAILABLE, NOT_AUTHORIZED

Default: AVAILABLE
created_at timestamp ISO-8601 Format
updated_at timestamp ISO-8601 Format

Metadata




 
 




Actions

Retrieve all accounts

GET /api/v1/facebook/accounts.json

Information

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.json

Information

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

Callback handler

GET /api/v1/facebook/account/callback.json

Information

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"
    }