# @grabjs/superapp-sdk

> SDK for Grab SuperApp WebView.

Latest version **1.8.12** (published 2026-05-05) · MIT license · 0 weekly downloads

## Install

```sh
npm install @grabjs/superapp-sdk
pnpm add @grabjs/superapp-sdk
yarn add @grabjs/superapp-sdk
bun add @grabjs/superapp-sdk
```

## Health

**Score 50/100 (C)** — status: active.

Positive: no vulnerabilities; high maintenance score.

Warnings: low downloads; no types; no esm support.

## Facts

| | |
|---|---|
| Version | 1.8.12 |
| Published | 2026-05-05 |
| First published | 2019-05-02 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 2 |
| Unpacked size | 79.2 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 28 |
| Author | Viet Hai Pham |
| Maintainers | akshay-grabtaxi, grabdev999, oprokofiev.gb, wei.zhao, chang.gan, iamzhanghao, sushant.tiwari, tureki, rayan.dsouza, leela.penumutchu, rahul.garg, amar.jain |
| Keywords | superapp, webview, android, ios |

## Links

- npm: https://www.npmjs.com/package/@grabjs/superapp-sdk
- Repository: https://github.com/grab/superapp-sdk
- Homepage: https://github.com/grab/superapp-sdk#readme
- Issues: https://github.com/grab/superapp-sdk/issues
- npm.io page: https://npm.io/package/@grabjs/superapp-sdk

## Dependencies (2)

- [crypto-js](https://npm.io/package/crypto-js.md) ^4.2.0
- [@grabjs/mobile-kit-bridge-sdk](https://npm.io/package/@grabjs/mobile-kit-bridge-sdk.md) ^2.2.2

## Alternatives

- [@sindresorhus/slugify](https://npm.io/package/@sindresorhus/slugify.md) — 3.7M weekly downloads
- [solid-js](https://npm.io/package/solid-js.md) — 2.7M weekly downloads
- [expo-glass-effect](https://npm.io/package/expo-glass-effect.md) — 2.5M weekly downloads
- [nanoassert](https://npm.io/package/nanoassert.md) — 780.8K weekly downloads
- [@ffmpeg/ffmpeg](https://npm.io/package/@ffmpeg/ffmpeg.md) — 529.5K weekly downloads

## Recent versions

- 1.8.12 (latest) — 2026-05-05
- 2.0.0-beta.63 (beta) — 2026-08-31
- 2.0.0-beta.62 — 2026-08-25
- 2.0.0-beta.61 — 2026-08-06
- 2.0.0-beta.60 — 2026-08-05
- 2.0.0-beta.59 — 2026-07-09
- 2.0.0-beta.58 — 2026-06-23
- 2.0.0-beta.57 — 2026-06-09
- 2.0.0-beta.56 — 2026-05-16
- 2.0.0-beta.55 — 2026-05-16
- 2.0.0-beta.54 — 2026-05-16
- 2.0.0-beta.53 — 2026-05-15
- 2.0.0-beta.51 — 2026-05-13
- 2.0.0-beta.50 — 2026-05-12
- 2.0.0-beta.49 — 2026-05-12
- … 61 more at https://npm.io/package/@grabjs/superapp-sdk/versions

## README

# JavaScript to Native bridge communication

## Overview

Communication between web-app and native Grab app happens via web bridge. Each request and
response object must have a structure defined in this document.

## Currently available modules

- [Camera Module](https://github.com/grab/superapp-sdk/blob/master/docs/CameraModule.md)
- [Checkout Module](https://github.com/grab/superapp-sdk/blob/master/docs/CheckoutModule.md).
- [Container Module](https://github.com/grab/superapp-sdk/blob/master/docs/ContainerModule.md).
- [Identity Module](https://github.com/grab/superapp-sdk/blob/master/docs/IdentityModule.md).
- [Location Module](https://github.com/grab/superapp-sdk/blob/master/docs/LocationModule.md).
- [Media Module](https://github.com/grab/superapp-sdk/blob/master/docs/MediaModule.md).
- [Scope Module](https://github.com/grab/superapp-sdk/blob/master/docs/ScopeModule.md).
- [Locale Module](https://github.com/grab/superapp-sdk/blob/master/docs/LocaleModule.md).
- [Storage Module](https://github.com/grab/superapp-sdk/blob/master/docs/StorageModule.md)
- [Platform Module](https://github.com/grab/superapp-sdk/blob/master/docs/PlatformModule.md)
- [SplashScreen Module](https://github.com/grab/superapp-sdk/blob/master/docs/SplashScreenModule.md)
- [SystemWebViewKit Module](https://github.com/grab/superapp-sdk/blob/master/docs/SystemWebViewKitModule.md)

One point to note is that partner engineers need to call `ScopeModule.reloadScopes` after redirection to partner website to load permissions from `GrabID`:

```javascript
const scopeModule = new ScopeModule();
await scopeModule.reloadScopes();
```

Afterwards, calls to module methods will reflect actual permissions.

## Request

Each request to native API should be done through JavaScript bridge provided by Grab. Please refer to specific Module API documentation for more details

## Response

Each response from the native bridge follows the same structure described bellow.

| Key         | Type                     | Description                                                                        |
| ----------- | ------------------------ | ---------------------------------------------------------------------------------- |
| status_code | Integer                  | Response status code (see list of codes below)                                     |
| result      | Object or primitive type | Result object according to method specification (required for **200** status code) |
| error       | String                   | Error message (required for **non-200** status codes)                              |

### Response status codes

| Code | Type              | Description                                                                     |
| ---- | ----------------- | ------------------------------------------------------------------------------- |
| 200  | OK                | Request successful, **result** value contains response data                     |
| 204  | No Content        | Request successful, **result** value doesn't contain data                       |
| 400  | Bad Request       | The request is malformed (e.g. missing **parameters**, missing **method** name) |
| 403  | Forbidden         | The client doesn't have permission to access this method                        |
| 424  | Failed Dependency | Underlying request returned an error                                            |
| 500  | Internal Error    | Unexpected internal error (e.g. failed to serialize response object)            |

### Success response example

```json
{
  "status_code": 200,
  "result": {
    "latitude": 1.234567,
    "longitude": -1.234567
  }
}
```

### Failure response example

```json
{
  "status_code": 403,
  "error": "Client doesn't have access to method \"getLocation\" in module \"LocationModule\""
}
```

---

- **GDMCOMMENT:** Latitudes and longitudes used in this file are either sourced from GrabPlaces, GrabMaps, OSM or randomly created by the developer and are not obtained from other external sources.

---
_Source: https://npm.io/package/@grabjs/superapp-sdk · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
