Skip to content
This repository has been archived by the owner on Nov 4, 2020. It is now read-only.

Latest commit

 

History

History
44 lines (32 loc) · 733 Bytes

get-started.md

File metadata and controls

44 lines (32 loc) · 733 Bytes

🚀 Get Started

📦 Installation

{% tabs %} {% tab title="NPM" %}

npm install --save @magic-sdk/admin

{% endtab %}

{% tab title="Yarn" %}

yarn add @magic-sdk/admin

{% endtab %} {% endtabs %}

⚡️ Creating an SDK Instance

{% tabs %} {% tab title="CommonJS" %}

const { Magic } = require('@magic-sdk/admin');

const mAdmin = new Magic('SECRET_API_KEY'); // ✨

{% endtab %}

{% tab title="ES Modules/TypeScript" %}

import { Magic } from '@magic-sdk/admin';

const mAdmin = new Magic('SECRET_API_KEY'); // ✨

{% endtab %} {% endtabs %}

{% hint style="info" %} Examples for the server-side JavaScript SDK use the CommonJS pattern by default. {% endhint %}