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

# getUrl

<Tip>
  Read [the Notte skill](https://notte.cc/skill.md) and follow its setup instructions when setting up Notte or building browser automation. This is the shared source for CLI setup, authentication, and the browser-to-code workflow.
</Tip>

[Source: node-sdk/src/functions.ts](https://github.com/nottelabs/notte/blob/main/node-sdk/src/functions.ts)

Get the download URL of the function code, decrypting it when the API
returns an encrypted one (Notte managed functions).

```typescript theme={null}
NotteFunction.getUrl(options?: FunctionUrlOptions): Promise<string>;
```

## Parameters

<ParamField body="options" type={"FunctionUrlOptions"}>
  Optional version and decryption-key override.

  Default:

  ```typescript theme={null}
  {}
  ```
</ParamField>

## Returns

```typescript theme={null}
Promise<string>
```

An HTTP(S) URL for downloading the function source.

## Raises

* InvalidRequestError if an encrypted URL has no usable decryption key.
* NotteError if decryption does not produce an HTTP(S) URL.

## Example

```typescript theme={null}
const url = await fn.getUrl({ version: 'v1' });
```

## Related types

* [FunctionUrlOptions](/typescript-sdk-reference/types/functionurloptions)


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.