# Session URL Retrieval

The `getCurrentSessionURL` function lets you capture a shareable link to the current Zipy session. By default, it returns the standard session URL. You can also include a timestamp, which links directly to the exact moment in the session when the function was called.

**Note:** If you don’t pass any option, `withCurrentTimestamp` defaults to `false` (regular session URL).

***

#### Using NPM

```javascript
// Regular session URL
const url = zipy.getCurrentSessionURL();
console.log('Session URL:', url);

// Session URL with timestamp
const urlWithTime = zipy.getCurrentSessionURL({ withCurrentTimestamp: true });
console.log('Session URL with timestamp:', urlWithTime);
```

***

#### Using Script Tag

<pre class="language-html"><code class="lang-html">&#x3C;script>
<strong>  // Regular session URL
</strong>  const url = window.zipy.getCurrentSessionURL();
  console.log('Session URL:', url);

  // Session URL with timestamp
  const urlWithTime = window.zipy.getCurrentSessionURL({ withCurrentTimestamp: true });
  console.log('Session URL with timestamp:', urlWithTime);
&#x3C;/script>
</code></pre>

✨ **Tip:** Use the timestamp option when you want to share the *exact activity point* in a session with your team.


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.zipy.ai/configure/session-url-retrieval.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
