# Open URL

{% embed url="<https://youtu.be/QxCkMp_n5JA?si=4zsLcUC9QQHYhAcT>" %}

Watch this on Youtube: <https://www.youtube.com/watch?v=QxCkMp_n5JA>

The **Open URL** action launches external URLs using the device's default browser or in-app web views. This enables seamless integration with web content, external services, and third-party applications.

***

#### 📦 Properties

| Property     | Type                | Required | Description                                  |
| ------------ | ------------------- | -------- | -------------------------------------------- |
| `url`        | Expression (String) | ✅        | The URL to open (must be valid format)       |
| `launchMode` | String              | ❌        | How to open the URL (see launch modes below) |

***

#### ✅ Common Use Cases

* Opening help documentation or FAQ pages
* Linking to social media profiles or marketing pages
* Accessing external product pages or support portals
* Integrating with payment gateways or authentication services
* Sharing links to articles, videos, or resources

***

#### ⚙️ Default Behavior

By default:

| Behavior                 | Description                                           |
| ------------------------ | ----------------------------------------------------- |
| **Launch Mode**          | Uses platform default (typically external browser)    |
| **URL Validation**       | Validates URL format before attempting to open        |
| **Error Handling**       | Throws errors for invalid URLs or unsupported schemes |
| **Platform Integration** | Leverages device capabilities for URL handling        |

***

#### 🛠️ How to Use

<figure><img src="/files/tohSJ04KXh1MnrVW8TTI" alt="Copy Slugs"><figcaption><p>Copy Slug</p></figcaption></figure>

1. Add the action to a widget event (e.g., button tap, link click)
2. Choose **Open URL** from the action list
3. Set the `url` property to the target web address
4. Optionally configure `launchMode` for specific opening behavior

***

#### 🌐 Launch Modes

<figure><img src="/files/u8UqgTwHavIE3qNi5P4U" alt="Copy Slugs"><figcaption><p>Copy Slug</p></figcaption></figure>

| Mode                               | Description                           | Use Case                   |
| ---------------------------------- | ------------------------------------- | -------------------------- |
| `platformDefault`                  | Uses device's default URL handler     | Standard web links         |
| `inAppWebView` / `inApp`           | Opens in embedded web view within app | Keep users in your app     |
| `externalApplication` / `external` | Opens in external browser/app         | Full browser experience    |
| `externalNonBrowserApplication`    | Opens in external non-browser app     | Deep linking to other apps |

***

{% embed url="<https://digiaacademy.portal.trainn.co/share/open-url-examples>" %}


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.digia.tech/logic-and-interaction/actions/open-url.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
