Skip to content

grab/superapp-sdk / skills

grabjs-superapp-sdk

Verified

API reference for `@grabjs/superapp-sdk`. Use when building a MiniApp that runs in the Grab SuperApp WebView and needs to call native features (camera, payments, authorization, authentication, permission, location, device storage, container UI customization) via the Grab `JSBridge`. Keywords: miniapp, webview, android, ios, jsbridge, grab, superapp.

references/modules/SystemWebViewKitModule.md

View on GitHub
# SystemWebViewKitModule

## API Reference

SDK module for opening URLs in the device's system browser via `JSBridge`.

| Method | Returns | Description |
| :--- | :--- | :--- |
| `redirectToSystemWebView(request: RedirectToSystemWebViewRequest)` | `Promise<RedirectToSystemWebViewResponse>` | Opens a URL in the device's system web browser or web view. |

## `redirectToSystemWebView`

Opens a URL in the device's system web browser or web view.

**Signature:** `redirectToSystemWebView(request: RedirectToSystemWebViewRequest): Promise<RedirectToSystemWebViewResponse>`

This method can return the following `status_code` values:
- `200` (OK): Redirect initiated successfully.
- `400` (Bad Request): Invalid request parameters.
- `424` (Failed Dependency): Dependency error occurred while processing the request.
- `500` (Internal Server Error): An unexpected error occurred.
- `501` (Not Implemented): Requires Grab app environment.

```typescript
import { SystemWebViewKitModule, isSuccess, isError } from '@grabjs/superapp-sdk';

// Initialize the system web view kit module
const webViewKit = new SystemWebViewKitModule();

// Open a URL in system web view
const response = await webViewKit.redirectToSystemWebView({
  url: 'https://www.example.com'
});

// Handle the response
if (isSuccess(response)) {
  console.log('Redirect initiated successfully');
} else if (isError(response)) {
  console.error(`Error ${response.status_code}: ${response.error}`);
} else {
  console.error('Unhandled response');
}
```
brainstormingobra/superpowersYou MUST use this before any creative work - creating features, building components, adding functionality, modifying behavior, or planning anything new, in software or out of it (a talk, a business, a renovation).Stars: 322kUpdated Claude CodeCodexVerifiedInstall
brand-guidelinesanthropics/skillsApplies Anthropic's official brand colors and typography to any sort of artifact that may benefit from having Anthropic's look-and-feel. Use it when brand colors or style guidelines, visual formatting, or company design standards apply.Stars: 198kUpdated Claude CodeCodexVerifiedInstall
frontend-designanthropics/skillsGuidance for distinctive, intentional visual design when building new UI or reshaping an existing one. Helps with aesthetic direction, typography, and making choices that don't read as templated defaults.Stars: 198kUpdated Claude CodeCodexVerifiedInstall
mcp-builderanthropics/skillsGuide for creating high-quality MCP (Model Context Protocol) servers that enable LLMs to interact with external services through well-designed tools. Use when building MCP servers to integrate external APIs or services, whether in Python (FastMCP) or Node/TypeScript (MCP SDK).Stars: 198kUpdated Claude CodeCodexVerifiedInstall