Setup

Prerequisites

Before you begin:

  • Get your API Key and Secret from the Creator Dashboardarrow-up-right

  • 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 play.fun API Key and API Secret as parameters.

import { OpenGameClient } from '@playdotfun/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 play.fun API. Read the quick start guide to get started making requests!

Last updated