Skip to content
API
Implementation

Implementing Beam

The implementation of our Player API consists of two components

  • The Beam game-platform client. We currently provide a Unity (C#) and Web (TypeScript) SDK. In the future, we will be releasing more implementations for various platforms (eg; Unreal)
  • The request client. We currently provide a C# and TypeScript clients.

The platform client (Unity)

The platform client contains helpers to get users started with Beam within your game.

Initialize the platform client

In order to interact with these clients, you will need a new type of API key - the Publishable API key. You will be able to find this API key by regenerating your API keys through the existing API. You can do so programmatically, or by interacting with the method in the OpenAPI / Swagger UI (opens in a new tab) interface.

var beamClient = gameObject.AddComponent<BeamClient>()
                .SetBeamApiKey("your-publishable-api-key") // required, sets your Publishable(!) API key
                .SetEnvironment(BeamEnvironment.Testnet) // optional, defaults to Testnet
                .SetDebugLogging(true) // optional, defaults to false
                .SetStorage(yourCustomStorageImplementation); // optional, defaults to PlayerPrefs storage;

The request client

The request client is a new client which can be used to generate Operations. Both the request clients we offer for the self-custodial services, are structured in similar fashion to the existing SDKs that offer custodial Profiles.

Keep in mind that we expect you to also use the Publishable API key in these clients.