Access
Connect cross-platform accounts & identity management
You can use the AccelByte .NET (C#) SDK to implement our backend services within your game. The SDK acts as a bridge between your game and our services. Follow the tutorial below to learn how to set up our .NET (C#) SDK.
There are two ways of integrating the SDK into your project. You can either:
To use the SDK, you will need to set the following environment variables in your system or debug profile (if you are using Visual Studio):
AB_BASE_URL* | AccelByte server base URL |
AB_CLIENT_ID* | OAuth client ID |
AB_CLIENT_SECRET* | OAuth client secret |
AB_APP_NAME* | Your app/game name. Keep it unique and short |
AB_NAMESPACE* | Your namespace ID |
AB_TRACEID_VERSION | Version of Amazon trace ID (default is 1) |
AB_ENABLE_TRACEID | Enable sending of Amazon trace ID on every request (default is 1). Set to 0 to disable. |
AB_ENABLE_USERAGENT | Enable sending user agent string for the default http client (default is 1). Set to 0 to disable. |
AB_USERNAME | Set the username for accessing AccelByte services |
AB_PASSWORD | Set the AB_USERNAME password |
Create an AccelByteSDK object.
using AccelByte.Sdk.Core;
AccelByteSDK sdk = AccelByteSDK.Builder
.UseDefaultHttpClient()
.UseDefaultConfigRepository()
.UseDefaultTokenRepository()
.Build();
The default configuration repository will load the required and optional variables from your environment. If you prefer to create your own repository, you can create a class that implements IConfigRepository and use it with the .SetConfigRepository method while creating the SDK object. You also can enable logging by calling the .EnableLog() method while creating the SDK object.
Log in as a client.
sdk.LoginClient();
Log in as a player.
sdk.LoginUser("<username>","<password>");
If you set .UseDefaultCredentialRepository or .SetCredentialRepository while creating the SDK object, you can omit the parameters for the LoginUser method.
Once completed, you can use the SDK to access all available AccelByte services.
See our .NET (C#) SDK example repo (opens new window) for a selection of test cases you can use to customize your game.
SDK reference (opens new window)
using AccelByte.Sdk.Api.Iam.Model;
using AccelByte.Sdk.Api.Iam.Operation;
using AccelByte.Sdk.Api.Iam.Wrapper;
SDK reference (opens new window)
using AccelByte.Sdk.Api.Basic.Model;
using AccelByte.Sdk.Api.Basic.Operation;
using AccelByte.Sdk.Api.Basic.Wrapper;
SDK reference (opens new window)
using AccelByte.Sdk.Api.Social.Model;
using AccelByte.Sdk.Api.Social.Operation;
using AccelByte.Sdk.Api.Social.Wrapper;
SDK reference (opens new window)
using AccelByte.Sdk.Api.Platform.Model;
using AccelByte.Sdk.Api.Platform.Operation;
using AccelByte.Sdk.Api.Platform.Wrapper;
SDK reference (opens new window)
using AccelByte.Sdk.Api.Group.Model;
using AccelByte.Sdk.Api.Group.Operation;
using AccelByte.Sdk.Api.Group.Wrapper;
SDK reference (opens new window)
using AccelByte.Sdk.Api.Cloudsave.Model;
using AccelByte.Sdk.Api.Cloudsave.Operation;
using AccelByte.Sdk.Api.Cloudsave.Wrapper;
SDK reference (opens new window)
using AccelByte.Sdk.Api.Dsmc.Model;
using AccelByte.Sdk.Api.Dsmc.Operation;
using AccelByte.Sdk.Api.Dsmc.Wrapper;
SDK reference (opens new window)
using AccelByte.Sdk.Api.Sessionbrowser.Model;
using AccelByte.Sdk.Api.Sessionbrowser.Operation;
using AccelByte.Sdk.Api.Sessionbrowser.Wrapper;
SDK reference (opens new window)
using AccelByte.Sdk.Api.Lobby.Model;
using AccelByte.Sdk.Api.Lobby.Operation;
using AccelByte.Sdk.Api.Lobby.Wrapper;
SDK reference (opens new window)
using AccelByte.Sdk.Api.Achievement.Model;
using AccelByte.Sdk.Api.Achievement.Operation;
using AccelByte.Sdk.Api.Achievement.Wrapper;
SDK reference (opens new window)
using AccelByte.Sdk.Api.Dslogmanager.Model;
using AccelByte.Sdk.Api.Dslogmanager.Operation;
using AccelByte.Sdk.Api.Dslogmanager.Wrapper;
SDK reference (opens new window)
using AccelByte.Sdk.Api.Ugc.Model;
using AccelByte.Sdk.Api.Ugc.Operation;
using AccelByte.Sdk.Api.Ugc.Wrapper;
SDK reference (opens new window)
using AccelByte.Sdk.Api.Leaderboard.Model;
using AccelByte.Sdk.Api.Leaderboard.Operation;
using AccelByte.Sdk.Api.Leaderboard.Wrapper;
SDK reference (opens new window)
using AccelByte.Sdk.Api.Gdpr.Model;
using AccelByte.Sdk.Api.Gdpr.Operation;
using AccelByte.Sdk.Api.Gdpr.Wrapper;
SDK reference (opens new window)
using AccelByte.Sdk.Api.Legal.Model;
using AccelByte.Sdk.Api.Legal.Operation;
using AccelByte.Sdk.Api.Legal.Wrapper;
SDK reference (opens new window)
using AccelByte.Sdk.Api.Matchmaking.Model;
using AccelByte.Sdk.Api.Matchmaking.Operation;
using AccelByte.Sdk.Api.Matchmaking.Wrapper;