The openInAppBrowser action opens a web page inside an in-app browser view — allowing users to browse external content (like blogs, help articles, or partner pages) without leaving your app environment.
This action is ideal for creating a seamless browsing experience while maintaining session and UI consistency.
JSX
Superfans.actions.openInAppBrowser({
path: "https://www.superfans.io/features" //String
})
Parameter Type Required Description path String yes The complete URL to open (must begin with http:// or https://).
Status Response Success { "status": "success", "message": "Url opened successfully" }Invalid Url { "status": "error", "errorId": 400, "errorHandle": "invalid-url", "message": "Invalid url" }Unexpected Error { "status": "error", "errorId": 500, "errorHandle": "unknown-error", "message": "Something unexpected happened" }
JavaScript HTML CSS
document.getElementById('openCartButton').addEventListener('click', () => {
Superfans.actions.openInAppBrowser({
path: "https://www.superfans.io/features" //String
})
});<div class="cart-container">
<button class="open-cart-btn" id="openCartButton">Visit our Website</button>
</div>.cart-container {
display: flex;
justify-content: center;
align-items: center;
height: 100vh;
background-color: #f0f0f0;
}
.open-cart-btn {
background-color: #28a745;
color: #fff;
border: none;
padding: 15px 30px;
border-radius: 8px;
font-size: 16px;
cursor: pointer;
transition: background-color 0.3s;
}
.open-cart-btn:hover {
background-color: #218838;
}
Use for extended reading: Perfect for articles, FAQs, or long-form content without leaving the app.
Keep URLs secure: Always use https:// for better security and compatibility.
Add contextual titles: Provide a clear title for better user orientation.
Network dependent: Requires internet access; handle offline states gracefully.
Limited functionality: Not all web features (popups, file uploads) may be supported in-app.
Session behavior: Browser view may not share cookies with native SDK sessions.
Styling control: The toolbar and UI are partially controlled by the SDK, not the webpage.