# EndpointReference.GetValueAsync

- Module: [Aspire.Hosting](/reference/api/go/aspire.hosting.md)
- Defined on: [EndpointReference](/reference/api/go/aspire.hosting/endpointreference.md)
- Version: `17.0.0`
- Kind: `method`

Gets the URL of the endpoint asynchronously. Waits for the endpoint to be allocated if necessary.

## Definition

```go
type EndpointReference interface {
    // ... omitted for brevity
    GetValueAsync(options ...*GetValueAsyncOptions) (*string, error)
}
```

## Signature

```go
GetValueAsync(options ...*GetValueAsyncOptions) (*string, error)
```

## Parameters

- `options` (`...*GetValueAsyncOptions`) -- optional settings, see [Options](#options)

## Options

Optional parameters are passed in a trailing `options ...*GetValueAsyncOptions` argument.

- `CancellationToken` (`*CancellationToken`) -- The cancellation token.

## Returns

`(*string, error)` -- The URL of the endpoint.

Returns `(*string, error)`.

## Defined on

- [EndpointReference](/reference/api/go/aspire.hosting/endpointreference.md) -- `handle`
