openURL
Opens the given URL. Depending on the scheme, this can open the host app's internal browser, a phone dialer (tel:), a mail client (mailto:), or another installed app via its custom scheme.
Signature
import { openURL } from '@apps-in-toss/web-framework';
declare function openURL(url: string): Promise<void>;
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
url | string | ✓ | The URL to open. Supports https://, tel:, and mailto: schemes. Invalid URLs may be silently ignored. |
Returns
Promise<void>— resolves once the open request is delivered.- In the devtools mock,
window.open(url, '_blank')is called instead.
Permission
No permission required.
Examples
Minimal
import { openURL } from '@apps-in-toss/web-framework';
await openURL('https://example.com');
Realistic — a "Call support" button
import { openURL } from '@apps-in-toss/web-framework';
export function SupportButton() {
async function callSupport() {
await openURL('tel:1234-5678');
}
return (
<button type="button" onClick={callSupport}>
Call customer support
</button>
);
}
Try it live
Open the Navigation page in sdk-example and run the openURL card.
Related APIs
Related guides
- Guides — Mini-app navigation flow patterns — mini-app entry/exit, opening external URLs, and screen-context (orientation, awake, secure) patterns.
External references
@apps-in-toss/web-framework— SDK package. The actual exports are re-exported from@apps-in-toss/web-bridge.