Token Management

This is the one stop shop to creating/deleting tokens for your members to register with.

Get Tokens

This will list all the tokens you have currently created.

Winforms

private async void GetTokens()
{
    Dictionary<string, List<object>> tokens = await Admin.GetTokens();
    foreach (var token in tokens) // Iterate through all entries in dictionary
    {
        Console.WriteLine(token.Key); // The token
        Console.WriteLine(token.Value[0]); // The level
        Console.WriteLine(token.Value[1]); // The expiry
    }
    foreach (var token in tokens.Keys) // Iterate through the collection of keys
    {
        Console.WriteLine(token);
    }
}

Generate Tokens

This will create tokens for your clients to use.

Winforms

private async void GenerateTokens()
{
    ResponseObject response = await Admin.GenerateTokens("prefix", "amount", "level", "expire");
    foreach (var token in response.Tokens)
    {
        Console.WriteLine(token);
    }
}

Delete Token

Deletes a specific token from your app.

Winforms

private async void GenerateTokens(object sender, RoutedEventArg e)
{
    await Admin.DeleteToken("token");
}

Last updated