> ## Documentation Index
> Fetch the complete documentation index at: https://help.cryptolens.io/llms.txt
> Use this file to discover all available pages before exploring further.

# .NET: ProductMethods

> Signatures, models and behavior for SKM.V3.Methods.ProductMethods in the .NET SDK 4.0.54.

Methods that perform operations on a product. A complete list
can be found here: [Product](/api-reference/generated/Product)

**Namespace:** `SKM.V3.Methods`\
**Version:** 4.0.54. Both packages; all six documented target frameworks.

<CodeGroup>
  ```csharp C# theme={null}
  public static class ProductMethods
  ```

  ```vb VB.NET theme={null}
  Public Module ProductMethods
  ```
</CodeGroup>

These methods return a result object. Check `Result == ResultType.Success` before using its data. In version 4.0.54, handled request and JSON errors normally return `ResultType.Error` with a diagnostic `Message`. A non-null result alone does not mean the request succeeded. See [Request Errors](/libraries/dotnet-reference/settings#request-errors).

## Counting Licenses

Use `SKM.V3`, `SKM.V3.Methods` and `SKM.V3.Models` (with `using` in C# or `Imports` in VB.NET). This example counts licenses created in the **2026 UTC calendar year**. Replace product ID `3349` and `YOUR_ACCESS_TOKEN`; the access token needs the **Get Keys permission**. `Total` includes all matches, even if they span several pages.

<CodeGroup>
  ```csharp C# theme={null}
  var result = ProductMethods.GetKeys("YOUR_ACCESS_TOKEN", new GetKeysModel
  {
      ProductId = 3349,
      Page = 1,
      SearchQuery = "created >= DateTime(2026,1,1) and created < DateTime(2027,1,1)"
  });

  if (result != null && result.Result == ResultType.Success)
  {
      Console.WriteLine("Licenses created in 2026: " + result.Total);
  }
  else
  {
      Console.WriteLine(result == null ? "No response." : result.Message);
  }
  ```

  ```vb VB.NET theme={null}
  Dim result = ProductMethods.GetKeys("YOUR_ACCESS_TOKEN", New GetKeysModel With {
      .ProductId = 3349,
      .Page = 1,
      .SearchQuery = "created >= DateTime(2026,1,1) and created < DateTime(2027,1,1)"
  })

  If result IsNot Nothing AndAlso result.Result = ResultType.Success Then
      Console.WriteLine("Licenses created in 2026: " & result.Total)
  Else
      Console.WriteLine(If(result Is Nothing, "No response.", result.Message))
  End If
  ```
</CodeGroup>

## Methods

<a id="get-keys-6711433adc" />

### GetKeys(string, GetKeysModel)

Searches license keys within a product and returns one page of matches.

<CodeGroup>
  ```csharp C# theme={null}
  public static GetKeysResult GetKeys(string token, GetKeysModel parameters)
  ```

  ```vb VB.NET theme={null}
  Public Shared Function GetKeys(token As String, parameters As GetKeysModel) As GetKeysResult
  ```
</CodeGroup>

[Web API Reference](/api-reference/generated/GetKeys)

**Parameters**

| Name | Type | Description |
| - | - | - |
| `token` | `string` | The access token. Read more at [Auth](/api-reference/generated/Auth) |
| `parameters` | [`GetKeysModel`](/libraries/dotnet-reference/models/get-keys-model) | The parameters that the method needs. |

**Returns:** [`GetKeysResult`](/libraries/dotnet-reference/models/get-keys-result). The API response. Check `Result` and `Message` before using the returned data.

The access token needs the **GetKeys permission**. Read `Total` for the number of matching licenses. `Returned` and `LicenseKeys` describe only the returned page. This SDK wrapper uses model version 1.

<a id="get-products-58050b9d34" />

### GetProducts(string, RequestModel)

Retrieves products accessible through the access token.

<CodeGroup>
  ```csharp C# theme={null}
  public static GetProductsResult GetProducts(string token, RequestModel parameters)
  ```

  ```vb VB.NET theme={null}
  Public Shared Function GetProducts(token As String, parameters As RequestModel) As GetProductsResult
  ```
</CodeGroup>

[Web API Reference](/api-reference/generated/GetProducts)

**Parameters**

| Name | Type | Description |
| - | - | - |
| `token` | `string` | The access token with the permission required by this API method. |
| `parameters` | [`RequestModel`](/libraries/dotnet-reference/models/request-model) | The request model. Its properties are listed on the linked model page. |

**Returns:** [`GetProductsResult`](/libraries/dotnet-reference/models/get-products-result). The API response. Check `Result` and `Message` before using the returned data.

## FAQ

<AccordionGroup>
  <Accordion title="How Do I Count Licenses Across Pages?" id="count-licenses">
    Read `GetKeysResult.Total`. `Returned` and `LicenseKeys.Count` describe the current page and can undercount the matching licenses. Apply the same search filter when requesting each page. For an account-wide count, sum the filtered totals for the relevant products. See [GetKeys](/api-reference/generated/GetKeys).
  </Accordion>
</AccordionGroup>

[.NET SDK Reference](/libraries/dotnet-api) · [Reviewed Source Revision](https://github.com/Cryptolens/cryptolens-dotnet/tree/30aaf399ba53d9a111bee896c35bf557fa219394)


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.