Presence comes to the People API
December 20, 2016Earlier this week, a new feature was added to Spark to tell you if a person is available or not. Based on your usage, we determine if you're actively using Spark and then in the client, help people understand if you're online or not by saying something like "Active 10 minutes ago" next to your name.
Now the Spark APIs have this same information available to you. The People API has two new fields, lastActivity
and status
that help your integration or bot determine if a Person is active or not. The lastActivity field gives you the date and time that Spark last saw the person doing something - writing a message or having a call, for example. The status field tells you if the person is "active" or "inactive".
These fields are read-only; there's no way to set a person's status through the API. Spark determines their status automatically, with no input needed from your side.
In the future, as Spark gets more presence options, the status field will gain those same options. So while you'll only see "active" and "inactive" today, you'll want to make sure your application doesn't break or behave oddly if you get a different status entirely.