> ## 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: UserAccount

> Signatures, models and behavior for SKM.V3.Accounts.UserAccount in the .NET SDK 4.0.54.

User Account Authentication class takes care of all the steps necessary to retrieve
customer licenses. Note, you need to make sure that the customer has an existing
SKM account that has been associated with the customer object in your account.

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

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

  ```vb VB.NET theme={null}
  Public Class UserAccount
  ```
</CodeGroup>

## Constructors

<a id="ctor-e09cd66cef" />

### UserAccount()

Creates an empty UserAccount object. This constructor does not send an API request.

<CodeGroup>
  ```csharp C# theme={null}
  public UserAccount()
  ```

  ```vb VB.NET theme={null}
  Public Sub New()
  ```
</CodeGroup>

## Methods

<a id="get-license-keys-f970af0f07" />

### GetLicenseKeys(string, string, string, int, string, string)

Requests customer-account authorization and retrieves that account's licenses.

<CodeGroup>
  ```csharp C# theme={null}
  public static GetLicenseKeysResult GetLicenseKeys(string machineCode, string token, string appName, int tokenExpires, string RSAPublicKey, string existingToken = null)
  ```

  ```vb VB.NET theme={null}
  Public Shared Function GetLicenseKeys(machineCode As String, token As String, appName As String, tokenExpires As Integer, RSAPublicKey As String, Optional existingToken As String = Nothing) As GetLicenseKeysResult
  ```
</CodeGroup>

**Parameters**

| Name | Type | Description |
| - | - | - |
| `machineCode` | `string` | The machine code you want to authorize. |
| `token` | `string` | The access token to access the "GetToken" method. |
| `appName` | `string` | A user friendly name of your application. |
| `tokenExpires` | `int` | Sets the number of days the access token should be valid. |
| `RSAPublicKey` | `string` | The RSA public key can be found here:<br />    [https://app.cryptolens.io/User/Security](https://app.cryptolens.io/User/Security) |
| `existingToken` | `string` | If you have already called this method once<br />    and received an access token as a result (despite an error), you can enter it here<br />    to avoid duplicate authorization by the user. |

**Returns:** [`GetLicenseKeysResult`](/libraries/dotnet-reference/models/get-license-keys-result). A GetLicenseKeysResult object containing Licenses, an optional LicenseKeyToken and an Error field.

**Checks:** Verifies the signature over the returned license list, activated machine codes and signing date. It does not replace application-specific license checks.

**Failure Behavior:** Authorization timeout and handled retrieval or signature errors are reported through Error. Malformed Base64, JSON or authorization inputs can throw.

When no existing access token is supplied, this flow asks the customer to authorize the application and can wait for approximately five minutes. Reuse LicenseKeyToken through `existingToken` after a retrieval failure. This is separate from `UserAuth.Login`, which accepts a username and password.

[.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.