# preview()

Canonical URL: https://developers.iagenify.com/ar/sdk/ref/compute-terminal/preview/
Language: ar

`terminal.preview() → Promise<string|null>`

Get the current URL for a published terminal port.

```javascript
const url = await terminal.preview();
if (url) console.log("Open preview:", url);
```

Returns the URL, or `null` if no preview address is available. A preview URL may carry a short-lived access ticket; treat it as a credential and do not log or publish it.

```python
url = terminal.preview()
if url:
    print("Open preview:", url)
```
