# Open link in browser

**URL:** <https://forums.creativeclouddeveloper.com/t/open-link-in-browser/608>\
**Category:** UXP Plugin API\
**Created:** [January 31, 2019, 7:03pm UTC](https://forums.creativeclouddeveloper.com/t/open-link-in-browser/608 "2019-01-31T19:03:50Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![talkaboutdesign](https://sea1.discourse-cdn.com/flex015/user_avatar/forums.creativeclouddeveloper.com/talkaboutdesign/32/80_2.png) [@talkaboutdesign](https://forums.creativeclouddeveloper.com/u/talkaboutdesign)\
**Post date:** [January 31, 2019, 7:03pm UTC](https://forums.creativeclouddeveloper.com/t/open-link-in-browser/608/1 "2019-01-31T19:03:50Z")

</div>

Is there an easy way to open a link in browser when a plugin is done running? I tried this and no dice.

shell.openExternal(“[http://google.com](http://google.com)”)

---

<div class="post-metadata">

**Author:** ![pklaschka](https://sea1.discourse-cdn.com/flex015/user_avatar/forums.creativeclouddeveloper.com/pklaschka/32/3162_2.png) [@pklaschka](https://forums.creativeclouddeveloper.com/u/pklaschka)\
**Post date:** [January 31, 2019, 7:17pm UTC](https://forums.creativeclouddeveloper.com/t/open-link-in-browser/608/2 "2019-01-31T19:17:24Z")

</div>

`shell.openExternal("http://google.com");` should work.

Did you import it with

```javascript
const {shell} = require("uxp");

```

before using your code snippet? Since it is a part of the `uxp` module, you need to import it first. After that, you can use it like this:

```javascript
const {shell} = require("uxp");
shell.openExternal("http://google.com");

```

If not: That’s how you can do it (cf. [https://adobexdplatform.com/plugin-docs/reference/uxp/class/Shell.html?h=openexternal](https://adobexdplatform.com/plugin-docs/reference/uxp/class/Shell.html?h=openexternal)).

If the problem persists, could you please share any errors that might get shown in the developer console here, so we can better help you? Thank you very much in advance 👍

Hope this helps,  
Best,  
Pablo

---

<div class="post-metadata">

**Author:** ![gdreyv](https://sea1.discourse-cdn.com/flex015/user_avatar/forums.creativeclouddeveloper.com/gdreyv/32/358_2.png) [@gdreyv](https://forums.creativeclouddeveloper.com/u/gdreyv)\
**Post date:** [June 4, 2019, 2:41pm UTC](https://forums.creativeclouddeveloper.com/t/open-link-in-browser/608/3 "2019-06-04T14:41:51Z")

</div>

@pklaschka, did it work for you? I’m running the code:

```auto
import * as uxp from "uxp";
try {
  await uxp.shell.openExternal("https://google.com");
} catch (ex) {
  console.log(ex);
}

```

and I’m getting the error: `Shell::openExternal: Error loading the url.`  
Xd version is ![image](https://us1.discourse-cdn.com/flex015/uploads/xdplugins/original/1X/b8c31fcf1bd5bee82560420b7b37a876eb6cf55f.png)  
BTW documentation for that method doesn’t include return type which is Promise.

UPD: after several restarts it start working.

---

<div class="post-metadata">

**Author:** ![kerrishotts](https://sea1.discourse-cdn.com/flex015/user_avatar/forums.creativeclouddeveloper.com/kerrishotts/32/8_2.png) [@kerrishotts](https://forums.creativeclouddeveloper.com/u/kerrishotts)\
**Post date:** [June 5, 2019, 4:13pm UTC](https://forums.creativeclouddeveloper.com/t/open-link-in-browser/608/4 "2019-06-05T16:13:22Z")

</div>

Strange. Maybe a UWP thing. That said, we’re delegating to the OS, so it’s surprising that it failed to load the web page. If it happens again, let us know.
