Graph API Version

Page Conversations

Reading

The page's conversations

Note: Time-based pagination is not available for the conversations endpoint.

Permissions

A page access token with pages_messaging permission can be used to view any conversation in which the page is involved. The user requesting the page access token must be an admin, editor, or moderator of the page.

Starting April 4, 2018, we have a new thread identifier, scoped_thread_key. Both scoped_thread_key and thread_id values will work for all related endpoints. After 90 days, the scoped_thread_id and thread_id values will be the same.

Please see the Changelog for more information.

Example

Graph API Explorer
GET /v5.0/{page-id}/conversations HTTP/1.1
Host: graph.facebook.com
/* PHP SDK v5.0.0 */
/* make the API call */
try {
  // Returns a `Facebook\FacebookResponse` object
  $response = $fb->get(
    '/{page-id}/conversations',
    '{access-token}'
  );
} catch(Facebook\Exceptions\FacebookResponseException $e) {
  echo 'Graph returned an error: ' . $e->getMessage();
  exit;
} catch(Facebook\Exceptions\FacebookSDKException $e) {
  echo 'Facebook SDK returned an error: ' . $e->getMessage();
  exit;
}
$graphNode = $response->getGraphNode();
/* handle the result */
/* make the API call */
FB.api(
    "/{page-id}/conversations",
    function (response) {
      if (response && !response.error) {
        /* handle the result */
      }
    }
);
/* make the API call */
new GraphRequest(
    AccessToken.getCurrentAccessToken(),
    "/{page-id}/conversations",
    null,
    HttpMethod.GET,
    new GraphRequest.Callback() {
        public void onCompleted(GraphResponse response) {
            /* handle the result */
        }
    }
).executeAsync();
// For more complex open graph stories, use `FBSDKShareAPI`
// with `FBSDKShareOpenGraphContent`
/* make the API call */
FBSDKGraphRequest *request = [[FBSDKGraphRequest alloc]
                               initWithGraphPath:@"/{page-id}/conversations"
                                      parameters:params
                                      HTTPMethod:@"GET"];
[request startWithCompletionHandler:^(FBSDKGraphRequestConnection *connection,
                                      id result,
                                      NSError *error) {
    // Handle the result
}];
If you want to learn how to use the Graph API, read our Using Graph API guide.

Parameters

ParameterDescription
folder
string

The target folder from which to retrieve conversations. Valid values are: inbox, other, page_done, and spam. Use folder=page_done for retrieving conversations archived after mid-2018.

tags
list<string>

Tags applied when retrieving conversations archived before mid-2018. Use tags=action:archived.

user_id
string

ID of the User.

Fields

Reading from this edge will return a JSON formatted result:

{ "data": [], "paging": {} }

data

A list of UnifiedThread nodes.

paging

For more details about pagination, see the Graph API guide.

Validation Rules

ErrorDescription
200Permissions error
80006There have been too many messenger api calls to this Page account. Wait a bit and try again. For more info, please refer to https://developers.facebook.com/docs/graph-api/overview/rate-limiting.
100Invalid parameter
613Calls to this api have exceeded the rate limit.

Creating

You can't perform this operation on this endpoint.

Updating

You can't perform this operation on this endpoint.

Deleting

You can't perform this operation on this endpoint.