Presence API

The Presence Service is a component at the service layer of the BDK which covers the Presence part of the REST API documentation. More precisely:

How to use

The central component for the Presence Service is the PresenceService class, it exposes the service APIs endpoints mentioned above. The service is accessible from theSymphonyBdk object by calling the presences() method:

@Slf4j
public class Example {
  public static final Long USER_ID = 123456789L;

  public static void main(String[] args) throws Exception {
    // Create BDK entry point
    final SymphonyBdk bdk = new SymphonyBdk(loadFromClasspath("/config.yaml"));

    // Get presence details
    PresenceService presences = bdk.presences();
    V2Presence userPresence = presences.getUserPresence(USER_ID, true);
    log.info("User presence: " + userPresence);
  }
}