Setup

Prerequisites

Before you begin:

  • Get your API Key and Secret from the Creator Dashboard

  • The following runtimes are supported:

    • Node.js 20 LTS or later

    • Deno v1.28.0 or higher

    • Bun 1.0 or later

    • Nitro v2.6 or greater

Instantiating the OpenGameClient

Import the OpenGameClient class and create an instance of it by passing your OGP API Key and API Secret as parameters.

import { OpenGameClient } from "@opusgamelabs/server-sdk";

const ogp = new OpenGameClient({
    apiKey: 'insert-your-api-key',
    secretKey: 'insert-your-secret-key'
});

This ogp client is now your entry point to interact with the OpenGame API. Read the quick start guide to get started making requests!

Last updated