> ## Documentation Index
> Fetch the complete documentation index at: https://subtext.fullstory.com/docs/llms.txt
> Use this file to discover all available pages before exploring further.

# Get a link to the current session recording

> Return a clickable URL to the current session recording so a teammate can jump from another tool straight to the matching replay.

`FS('getSession')` returns a clickable URL to the current session recording. Use it to link FullStory sessions back into other tools — analytics, error tracking, customer support — so a teammate can jump from their tool of choice straight to the matching replay.

```js theme={null}
const url = FS('getSession', { format: 'url.now' })
// e.g. https://app.fullstory.com/ui/<orgId>/session/<sessionId>:now
```

## Formats

| `format`    | Returns                                                                  | Use for                                                                |
| ----------- | ------------------------------------------------------------------------ | ---------------------------------------------------------------------- |
| `'url.now'` | URL with a timestamp marker that opens the session at the current moment | Linking from analytics tools at the moment a specific action happened. |
| `'url'`     | URL to the start of the session                                          | Linking from user-level metadata that should always open from the top. |
| *(omitted)* | URL to the start of the session                                          | Same as `'url'`.                                                       |

## When it returns a value

<Note>
  `FS('getSession')` returns `null` until FullStory has started a session. After `init()` resolves and the first capture event fires, the URL is available.
</Note>

In React, read it inside an effect after a tick or two. The safest pattern is to call it just before you push it to another tool, inside the same effect that handles identification:

```tsx theme={null}
useEffect(() => {
  if (!user) return
  FS('setIdentity', { uid: user.id, properties: { ... } })
  const subtextUrl = FS('getSession', { format: 'url.now' })
  if (subtextUrl) {
    posthog.identify(user.id, { subtext_url: subtextUrl })
  }
}, [user])
```

If the URL isn't ready yet (rare, but possible if the snippet hasn't bootstrapped), retry on the next event tick or skip silently — the linkage is best-effort.

## Stability

The URL changes:

* Across sessions — every new visit gets a new session id.
* When you re-identify — calling `setIdentity` with a different `uid` starts a new session.

<Warning>
  Re-attach the URL to other tools whenever you re-identify.
</Warning>

## See also

* **Analytics tool linkage** — concrete examples for PostHog, Segment, Amplitude, Mixpanel.
* [Identification](/docs/api/identification) — the lifecycle hook to read the URL from.
