Set presence

Learn how to manage the active status of a Facebook account with Unipile API.

Set the account's presence

To change the account's active status, use Set Presence. Facebook only supports online and offline.

await messagingApi.setPresence({
  path: {
    account_id: "acc_123456789",
  },
  body: {
    presence: "online",
  },
});
messaging_api.set_presence(
    "acc_123456789",
    {"presence": "online"},
)
curl --request POST \
     --url https://api.unipile.com/v2/acc_123456789/presence \
     --header 'X-API-KEY: api-key' \
     --header 'accept: application/json' \
     --header 'content-type: application/json' \
     --data '
{
  "presence": "online"
}
'

Read another user's presence

To retrieve the presence of a user, use Get a User Presence.

curl --request GET \
     --url https://api.unipile.com/v2/acc_123456789/users/user_id/presence \
     --header 'X-API-KEY: api-key' \
     --header 'accept: application/json'

Show a typing indicator

To show that the account is typing or recording in a chat, use Set Composing Status.


Did this page help you?