Kinectify.SDK
2.0.18
dotnet add package Kinectify.SDK --version 2.0.18
NuGet\Install-Package Kinectify.SDK -Version 2.0.18
<PackageReference Include="Kinectify.SDK" Version="2.0.18" />
<PackageVersion Include="Kinectify.SDK" Version="2.0.18" />
<PackageReference Include="Kinectify.SDK" />
paket add Kinectify.SDK --version 2.0.18
#r "nuget: Kinectify.SDK, 2.0.18"
#:package Kinectify.SDK@2.0.18
#addin nuget:?package=Kinectify.SDK&version=2.0.18
#tool nuget:?package=Kinectify.SDK&version=2.0.18
Kinectify C# SDK
The Kinectify C# SDK is a library that allows Kinectify customers to integrate with our public-facing APIs. The SDK is implemented in C# and targets .NET 8.0 and .NET 7.
Requirements
- .NET 8.0 SDK or .NET 7.0 SDK
- Visual Studio 2019 or later
- An active Kinectify account
Configuration
The SDK requires some configuration to work properly. The configuration is represented by the KinectifyConfiguration class. Here are the configuration options:
TenantType: The type of the tenant.TenantId: The ID of the tenant.Jurisdiction: The jurisdiction.Authorization: The authorization configuration.TestMode: A flag indicating whether the SDK is in test mode.KinectifyDomain: The domain of Kinectify.PlayerHashSalt: The salt used to hash the player for verification of imports.
You can provide these configuration options through the appsettings.json file in your project or through environment variables.
Usage
Install the Kinectify SDK Package
You can install the package through NuGet using the following command:
```bash
dotnet add package Kinectify.SDK --version 2.0.11
```
Setup your configuration
Kinectify recommends setting up the configuration using either your appsettings.json file or environment variables. The solution is intended to work with the default IConfiguration system in C#.
Add the following to your appsettings.json file:
{
...,
"Kinectify": {
"TenantType": "<YOUR_TENANT_TYPE>",
"TenantId": "<YOUR_TENANT_ID>",
"PlayerHashSalt": "<YOUR_PLAYER_HASHSALT>",
"Jurisdiction": "..",
"Authorization": {
"ClientId": "<YOUR_CLIENT_ID>",
"ClientSecret": "<YOUR_CLIENT_SECRET>",
"Domain": "...",
"Audience": "...",
"Scopes": "...",
"GrantType": "..."
},
"TestMode": "true",
"KinectifyDomain": "..."
}
}
Contact your Implementation Specialist to get these values
Register Kinectify resources
You need to register Kinectify resources in your dependency injection container. Kinectify provides an extension method to make this very easy:
var builder = new ConfigurationBuilder()
.AddJsonFile("appsettings.json")
.AddJsonFile($"appsettings{environment}.json", true, true)
.AddEnvironmentVariables();
IConfiguration configuration = builder.Build();
var services = new ServiceCollection();
services.UseKinectifyClient(configuration); // This extension method registers the Kinectify SDK services with the IServiceCollection interface.
var provider = services.BuildServiceProvider(); // we will use this in our examples below, but you would most likely be using an AppBuilder and other injection tools
Create a Player
var playerClient = provider.GetService<PlayerClient>();
// Create a Player
var playerId = "{Your Unique ID for a player}";
Player player = new()
{
PlayerId = playerId,
Name = new()
{
FirstName = "John",
LastName = "Doe",
MiddleName = "James",
Title = "Mr."
},
Email = "john.doe@gmail.com",
Username = "jjdoe",
TaxId = "123456789",
DateOfBirth = new DateTime(1980, 5, 14),
PhoneNumbers = new List<string> { "7025559823", "7025554477" },
Citizenship = "US",
Residence = "US",
CurrentAddresses = new List<Address>
{
new Address
{
Address1 = "2450 Paradise Rd",
Address2 = "Apt 1203",
City = "Las Vegas",
StateProvince = "NV",
PostalCode = "89109",
CountryCode = "US",
AddressType = "Home"
}
}
};
var result = await playerClient.CreateWithDetailsAsync(player);
if (result.Success)
{
Console.WriteLine($"Player created successfully: {result.Message}");
}
else
{
Console.WriteLine($"Failed to create player [{result.StatusCode}]: {result.Message}");
}
Validate Player Data
In some cases, you may want to run a check on a handful of players to ensure they have been ingested into the Kinectify Platform. DO NOT run this method on every player or every time you call the CreateWithDetailsAsync method. It is intended for spot checking purposes during implementation, not for regular use after integration. This method will confirm the player data that you provide matches the player data in Kinectify.
var playerId = "{Your Unique ID for a player}";
Player player = new()
{
PlayerId = playerId,
Name = new()
{
FirstName = "John",
LastName = "Doe"
},
Email = "john.doe@gmail.com",
};
var isMatching = await playerClient.VerifyPlayer(player);
Create a Transaction
var transactionClient = provider.GetService<TransactionClient>();
var property = "YPC"; // Your property code
// Create a Transaction
PlayerTransaction transaction = new()
{
PropertyCode = property,
TransactionType = TransactionType.Transaction,
Direction = Direction.In,
ExternalTransactionId = "1000000",
PlayerExternalId = playerId, // This is your unique ID for the player (rewards number, internal player id, etc.)
Amount = 10000,
TransactionDate = new DateTime(2018, 4, 1, 18, 15, 0),
GameDate = new DateTime(2018, 4, 1, 8, 0, 0),
Location = "BJ1000",
Code = TransactionCode.ChipPurchase,
SourceInstrument = new BaseInstrument
{
InstrumentType = InstrumentType.Cash,
InstrumentNumber = "",
Currency = "USD",
Nationality = Nationality.Domestic,
Country = "US",
Purpose = "",
},
TargetInstrument = new BaseInstrument
{
InstrumentType = InstrumentType.Chips,
InstrumentNumber = "",
Currency = "USD",
Nationality = Nationality.Domestic,
Country = "US",
Purpose = "",
},
IsExcluded = false,
Metadata = new Dictionary<string, string>
{
{ "Play Minutes", "45" }
}
};
var result = await transactionClient.CreateWithDetailsAsync(transaction);
if (result.Success)
{
Console.WriteLine($"Transaction created successfully: {result.Message}");
}
else
{
Console.WriteLine($"Failed to create transaction [{result.StatusCode}]: {result.Message}");
}
Create Gaming Activity
Creating Gaming Activity (Wagers, Wins, and Losses) is just like creating a transaction.
var gamingActivityClient = provider.GetService<GamingActivityClient>();
var property = "YPC"; // Your property code
PlayerGamingActivity gamingActivity = new()
{
PropertyCode = property,
TransactionType = TransactionType.GamingActivity,
ActivityCode = ActivityCode.WAGER,
Code = TransactionCode.Gameplay,
GameType = "Table",
ExternalTransactionId = "1000000-WA",
PlayerExternalId = playerId, // This is the player ID that was created in the previous step.
Amount = 16000,
TransactionDate = new DateTime(2018, 4, 1, 18, 15, 0),
GameDate = new DateTime(2018, 4, 1, 8, 0, 0),
ManuallyCreated = false,
Location = "BJ1000",
Instrument = new BaseInstrument
{
InstrumentType = InstrumentType.Chips,
InstrumentNumber = "",
Currency = "USD",
Country = "US",
Nationality = Nationality.Domestic,
},
Metadata = new Dictionary<string, string>
{
{ "Cash Buy In", "$10,000" },
{ "Chip Buy In", "$0" },
{ "Non Cash Buy In", "$0" }
}
};
var result = await gamingActivityClient.CreateWithDetailsAsync(gamingActivity);
if (result.Success)
{
Console.WriteLine($"Gaming activity created successfully: {result.Message}");
}
else
{
Console.WriteLine($"Failed to create gaming activity [{result.StatusCode}]: {result.Message}");
}
Bulk Operations
The Kinectify API supports creating players, transactions, and gaming activity in bulk. The bulk endpoints can process ~50trx per second, so expect it 20 seconds to finish all 500 objects below.
var bulkTransactionClient = provider.GetService<BulkTransactionClient>();
var property = "YPC"; // Your property code
var transactions = new List<PlayerTransaction>
{
new PlayerTransaction
{
PropertyCode = property,
TransactionType = TransactionType.Transaction,
Direction = Direction.In,
ExternalTransactionId = "2000000",
PlayerExternalId = "200000",
Amount = 25000,
TransactionDate = new DateTime(2019, 6, 1, 18, 15, 0),
GameDate = new DateTime(2019, 6, 1, 8, 0, 0),
Location = "M1000",
Code = TransactionCode.SBI,
SourceInstrument = new BaseInstrument
{
InstrumentType = InstrumentType.Cash,
InstrumentNumber = "",
Currency = "USD",
Nationality = Nationality.Domestic,
Country = "US",
Purpose = "",
},
TargetInstrument = new BaseInstrument
{
InstrumentType = InstrumentType.ElectronicGamingAccount,
InstrumentNumber = "",
Currency = "USD",
Nationality = Nationality.Domestic,
Country = "US",
Purpose = "",
},
IsExcluded = false,
Metadata = new Dictionary<string, string>
{
{ "Play Minutes", "137" }
}
},
// ... more transactions (up to 250 per array)
};
var gamingActivities = new List<PlayerGamingActivity>
{
new PlayerGamingActivity
{
PropertyCode = property,
TransactionType = TransactionType.GamingActivity,
ActivityCode = ActivityCode.WAGER,
Code = TransactionCode.Gameplay,
GameType = "Slot",
ExternalTransactionId = "2000000-WA",
PlayerExternalId = "200000",
Amount = 8567.34m,
TransactionDate = new DateTime(2018, 4, 1, 18, 15, 0),
GameDate = new DateTime(2018, 4, 1, 8, 0, 0),
ManuallyCreated = false,
Location = "M1000",
Instrument = new BaseInstrument
{
InstrumentType = InstrumentType.TITO,
InstrumentNumber = "",
Currency = "USD",
Country = "US",
Nationality = Nationality.Domestic,
},
Metadata = new Dictionary<string, string>
{
{ "Coin In", "$8,567.34" },
{ "Coin Out", "$9,734.25" }
}
},
// ... more gaming activities (up to 250 per array)
};
var bulk = new BulkTransactionImportModel
{
Transactions = transactions, // an array of up to 250 transaction objects
GamingActivities = gamingActivities // an array of up to 250 gaming activity objects
};
var result = await bulkTransactionClient.CreateWithDetailsAsync(bulk);
if (result.Success)
{
Console.WriteLine($"Bulk transactions created successfully: {result.Message}");
}
else
{
Console.WriteLine($"Failed to create bulk transactions [{result.StatusCode}]: {result.Message}");
}
// Bulk importing players
var playerMassImportClient = provider.GetService<PlayerMassImportClient>();
var playerImport = new List<PlayerImport>
{
new PlayerImport
{
Name = new Name
{
FirstName = "Maria",
LastName = "Doe",
MiddleName = "Isabel",
Title = "Ms."
},
PlayerId = "200000",
Email = "maria.doe@example.com",
TaxId = "987654321",
DateOfBirth = new DateTime(1992, 11, 5),
PhoneNumbers = new List<string> { "6465551234", "6465556789" },
Citizenship = "US",
Residence = "US",
CurrentAddresses = new List<Address>
{
new Address
{
Address1 = "789 Fifth Avenue",
Address2 = "Apt 45C",
City = "New York",
StateProvince = "NY",
PostalCode = "10022",
CountryCode = "US",
AddressType = "Home"
}
}
// ... other fields
},
new PlayerImport
{
Name = new Name
{
FirstName = "Jonathan",
LastName = "Doe",
MiddleName = "Alexander",
Title = "Mr."
},
PlayerId = "200001",
Email = "jonathan.doe@example.com",
TaxId = "123456789",
DateOfBirth = new DateTime(1987, 3, 22),
PhoneNumbers = new List<string> { "3105554321" },
Citizenship = "US",
Residence = "US",
CurrentAddresses = new List<Address>
{
new Address
{
Address1 = "2450 Sunset Boulevard",
Address2 = "Unit 12B",
City = "Los Angeles",
StateProvince = "CA",
PostalCode = "90026",
CountryCode = "US",
AddressType = "Home"
}
}
// ... other fields
}
}; // this array should not exceed 100 players
var result = await playerMassImportClient.CreateWithDetailsAsync(playerImport);
if (result.Success)
{
Console.WriteLine($"Players imported successfully: {result.Message}");
}
else
{
Console.WriteLine($"Failed to import players [{result.StatusCode}]: {result.Message}");
}
| Product | Versions Compatible and additional computed target framework versions. |
|---|---|
| .NET | net7.0 is compatible. net7.0-android was computed. net7.0-ios was computed. net7.0-maccatalyst was computed. net7.0-macos was computed. net7.0-tvos was computed. net7.0-windows was computed. net8.0 is compatible. net8.0-android was computed. net8.0-browser was computed. net8.0-ios was computed. net8.0-maccatalyst was computed. net8.0-macos was computed. net8.0-tvos was computed. net8.0-windows was computed. net9.0 was computed. net9.0-android was computed. net9.0-browser was computed. net9.0-ios was computed. net9.0-maccatalyst was computed. net9.0-macos was computed. net9.0-tvos was computed. net9.0-windows was computed. net10.0 was computed. net10.0-android was computed. net10.0-browser was computed. net10.0-ios was computed. net10.0-maccatalyst was computed. net10.0-macos was computed. net10.0-tvos was computed. net10.0-windows was computed. |
-
net7.0
- Auth0.AuthenticationApi (>= 7.26.2)
- AutoMapper (>= 13.0.1)
- FluentValidation (>= 11.9.2)
- FluentValidation.DependencyInjectionExtensions (>= 11.9.2)
- IdentityModel (>= 7.0.0)
- Microsoft.Extensions.Configuration.Abstractions (>= 7.0.0)
- Microsoft.Extensions.Configuration.Binder (>= 7.0.4)
- Microsoft.Extensions.DependencyInjection.Abstractions (>= 7.0.0)
- Microsoft.Extensions.Http (>= 7.0.0)
-
net8.0
- Auth0.AuthenticationApi (>= 7.26.2)
- AutoMapper (>= 13.0.1)
- FluentValidation (>= 11.9.2)
- FluentValidation.DependencyInjectionExtensions (>= 11.9.2)
- IdentityModel (>= 7.0.0)
- Microsoft.Extensions.Configuration.Abstractions (>= 7.0.0)
- Microsoft.Extensions.Configuration.Binder (>= 7.0.4)
- Microsoft.Extensions.DependencyInjection.Abstractions (>= 7.0.0)
- Microsoft.Extensions.Http (>= 7.0.0)
NuGet packages
This package is not used by any NuGet packages.
GitHub repositories
This package is not used by any popular GitHub repositories.
| Version | Downloads | Last Updated |
|---|---|---|
| 2.0.18 | 240 | 4/30/2026 |
| 2.0.17 | 112 | 4/28/2026 |
| 2.0.16 | 109 | 4/8/2026 |
| 2.0.15 | 517 | 11/21/2025 |
| 2.0.11 | 108 | 5/19/2026 |
| 2.0.10 | 277 | 1/16/2025 |
| 2.0.9 | 148 | 1/16/2025 |
| 2.0.8 | 146 | 1/16/2025 |
| 2.0.7 | 156 | 1/10/2025 |
| 2.0.6 | 150 | 1/10/2025 |
| 2.0.5 | 160 | 1/8/2025 |
| 2.0.4 | 245 | 10/4/2024 |
| 2.0.3 | 146 | 1/8/2025 |
| 2.0.2 | 165 | 11/12/2024 |
| 2.0.1 | 167 | 10/9/2024 |
| 1.0.8 | 168 | 10/4/2024 |