Use Web Launch to Send Links to Headsets from the Web
Web Launch allows developers to let users send a website URL to their Meta Quest headset directly from a site on their computer or phone, or save the URL for later. This URL opens in the headset on Browser.
The target URL must use HTTPS and be URL encoded.
Here are examples of a URL using HTTPS:
- Correct URL: https://www.meta.com
- Incorrect URL: www.meta.com
The target URL must be appended to the end of https://www.oculus.com/open_url/?url= using UTF-8 encoding for the special characters. Here’s a code sample and some examples of appending a URL to the endpoint using URL encoding:
Code sample:
let sendToQuestUrl = new URL("https://oculus.com/open_url/")
sendToQuestUrl.searchParams.set("url", linkUrl)`
- Correct URL: https://www.oculus.com/open_url/?url=https%3A%2F%2Fwww.meta.com
- Incorrect URL : https://www.oculus.com/open_url/?url=https://www.meta.com
- This is done so users know what devices a link supports and for brand guideline purposes
With this criteria met, clicking (https://www.oculus.com/open_url/?url=https%3A%2F%2Fwww.meta.com)[https://www.oculus.com/open_url/?url=https%3A%2F%2Fwww.meta.com] in a computer’s web browser should take you to the Web Launch tool where you can launch www.meta.com in your Meta Quest headset.
It is also strongly recommended to use Meta Quest branding on the button or call site where this call is triggered.
To integrate this into your site, implement the Web Launch endpoint below:
https://www.oculus.com/open_url/?url=<url_to_open_in_headset>
Here’s an example of how to integrate the endpoint in HTML:
<a href="https://www.oculus.com/open_url/?url=https%3A%2F%2Fwww.meta.com">Open Meta.com on your Meta Quest headset</a>
Here’s how to do it with JavaScript:
function sendLinkToQuest (linkUrl) {
let sendToQuestUrl = new URL("https://oculus.com/open_url/");
sendToQuestUrl.searchParams.set("url", linkUrl);
window.location.href = sendToQuestUrl;
}
sendLinkToQuest("https://www.meta.com");