***

title: getFullUrl
slug: /reference/typescript/agents/agent-base/get-full-url
description: Get the full URL for this agent's endpoint, including host, port, and route.
max-toc-depth: 3
---------------------

For a complete index of all SignalWire documentation pages, fetch https://signalwire.com/docs/llms.txt

[manual-set-proxy-url]: /docs/server-sdks/reference/typescript/agents/agent-base/manual-set-proxy-url

Get the full URL for this agent's endpoint. The URL is constructed from the agent's
host, port, and route. When behind a proxy, the `SWML_PROXY_URL_BASE` environment
variable or [`manualSetProxyUrl()`][manual-set-proxy-url] takes precedence.

## **Parameters**

<ParamField path="includeAuth" type="boolean" default="false" toc={true}>
  Whether to embed Basic Auth credentials in the URL (e.g.,
  `https://user:pass@host:port/route`).
</ParamField>

## **Returns**

`string` -- The fully constructed URL string.

## **Example**

```typescript {6}
import { AgentBase } from '@signalwire/sdk';

const agent = new AgentBase({ name: 'support', route: '/support', port: 3000 });
agent.setPromptText('You are a helpful assistant.');

const url = agent.getFullUrl();
console.log(url); // http://localhost:3000/support

const urlWithAuth = agent.getFullUrl(true);
console.log(urlWithAuth); // http://user:pass@localhost:3000/support
```