# Open Link

`link` actions open a variety of links. This includes:&#x20;

* Web links (http/https) in Safari, or an in-app browser
* Deep links into [parts of you app, or triggering native code](https://docs.criticalmoments.io/actions-in-app-messaging/custom-actions)
* System links, like linking to settings with `app-settings:`&#x20;
* Deep linking into other apps, like `spotify:album:4oktVvRuO1In9B7Hz0xm0a`&#x20;

<figure><img src="https://648587291-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FntHgSpSJ3tixDsCMhK2u%2Fuploads%2FbgtBv9czp0SCX7KVWEWW%2Foutput2.gif?alt=media&#x26;token=71cc6ac4-61f9-4e6a-86fd-c9edba4080bf" alt="" width="160"><figcaption><p>Opening a link in the in-app browser and Safari</p></figcaption></figure>

### Link Action Config

Links have the actionType `link` and an actionData object with the following keys:

* `url` \[string, required]: the URL to open
* `useEmbeddedBrowser` \[bool, optional]: If true, will open the link in an in-app browser instead of launching to Safari. Only valid for http/https links.

### Config Examples

```
"web_link_action": {
    "actionType": "link",
    "actionData": {
        "url": "https://criticalmoments.io"
    }
},
"web_link_embedded_action": {
    "actionType": "link",
    "actionData": {
        "url": "https://criticalmoments.io",
        "useEmbeddedBrowser": true
    }
},
"settings_link_action": {
    "actionType": "link",
    "actionData": {
        "url": "app-settings:"
    }
},
"main_screen_deeplink_action": {
    "actionType": "link",
    "actionData": {
        "url": "critical-moments-sampleapp:main"
    }
}
```
