Skip to content

Installation

SDK can be connected in two ways:

  • as an npm package (ESM/CJS) for Node.js and bundlers
  • as a UMD bundle in the browser via a <script> tag

Node.js

Requirement

Supported versions ^18.0.0 || ^20.0.0 || >=22.0.0

bash
npm install @aspro-cloud/miniapp-jssdk
bash
yarn add @aspro-cloud/miniapp-jssdk

Import the library into your project:

ts
import { App, Frame, Toast } from '@aspro-cloud/miniapp-jssdk'
ts
const { App, Frame, Toast } = require('@aspro-cloud/miniapp-jssdk')

UMD

To include the latest version of the library from the Аспро.Cloud portal, simply add a <script> tag to your HTML file:

html
<script src="https://my.aspro.cloud/static/miniapp/jssdk@latest/dist/miniapp-jssdk.min.js"></script>

After including the script, the SDK is available via the global variable ACloudMiniApp:

js
const App = window.ACloudMiniApp;
const Frame = App.Frame;
const Toast = Frame.Toast;

Published under the MIT license.