---
title: "Engage.getGuestId()"
slug: "engage-getguestid"
abstract: "Describes the getGuestId() function in the Sitecore Engage SDK (Sitecore CDP Stream API)."
---
# Engage.getGuestId()

The asynchronous `getGuestId()` function returns the guest reference.

sidebar. Parameters

none

Log the guest reference to the console:

```javascript
engage.getGuestId().then(guestId => {
  console.log(guestId);
});
// "f7aabbca-1c1b-4fc2-be72-3e16294a4f03"

```