# AsyncServiceURL

> **Class** in `langsmith`

📖 [View in docs](https://reference.langchain.com/python/langsmith/sandbox/_models/AsyncServiceURL)

Async variant of :class:`ServiceURL` with auto-refreshing token.

Properties and HTTP helpers are async. Use with
:meth:`AsyncSandboxClient.service` or :meth:`AsyncSandbox.service`.

Example::

    svc = await sb.service(port=3000)

    resp = await svc.get("/api/data")
    print(await svc.get_browser_url())

## Signature

```python
AsyncServiceURL(
    self,
    browser_url: str,
    service_url: str,
    token: str,
    expires_at: str,
    *,
    _refresher: Optional[Callable[[], Awaitable[AsyncServiceURL]]] = None,
)
```

## Constructors

```python
__init__(
    self,
    browser_url: str,
    service_url: str,
    token: str,
    expires_at: str,
    *,
    _refresher: Optional[Callable[[], Awaitable[AsyncServiceURL]]] = None,
) -> None
```

| Name | Type |
|------|------|
| `browser_url` | `str` |
| `service_url` | `str` |
| `token` | `str` |
| `expires_at` | `str` |
| `_refresher` | `Optional[Callable[[], Awaitable[AsyncServiceURL]]]` |


## Properties

- `token`
- `service_url`
- `browser_url`
- `expires_at`

## Methods

- [`get_token()`](https://reference.langchain.com/python/langsmith/sandbox/_models/AsyncServiceURL/get_token)
- [`get_service_url()`](https://reference.langchain.com/python/langsmith/sandbox/_models/AsyncServiceURL/get_service_url)
- [`get_browser_url()`](https://reference.langchain.com/python/langsmith/sandbox/_models/AsyncServiceURL/get_browser_url)
- [`get_expires_at()`](https://reference.langchain.com/python/langsmith/sandbox/_models/AsyncServiceURL/get_expires_at)
- [`request()`](https://reference.langchain.com/python/langsmith/sandbox/_models/AsyncServiceURL/request)
- [`get()`](https://reference.langchain.com/python/langsmith/sandbox/_models/AsyncServiceURL/get)
- [`post()`](https://reference.langchain.com/python/langsmith/sandbox/_models/AsyncServiceURL/post)
- [`put()`](https://reference.langchain.com/python/langsmith/sandbox/_models/AsyncServiceURL/put)
- [`patch()`](https://reference.langchain.com/python/langsmith/sandbox/_models/AsyncServiceURL/patch)
- [`delete()`](https://reference.langchain.com/python/langsmith/sandbox/_models/AsyncServiceURL/delete)
- [`from_dict()`](https://reference.langchain.com/python/langsmith/sandbox/_models/AsyncServiceURL/from_dict)

---

[View source on GitHub](https://github.com/langchain-ai/langsmith-sdk/blob/70260f8db5b02e286a22f9524fba283a2513859a/python/langsmith/sandbox/_models.py#L270)