Search Results for

    Show / Hide Table of Contents

    Class ProductMethods

    Methods that perform operations on a product. A complete list can be found here: https://app.cryptolens.io/docs/api/v3/Product

    Inheritance
    object
    ProductMethods
    Inherited Members
    object.ToString()
    object.Equals(object)
    object.Equals(object, object)
    object.ReferenceEquals(object, object)
    object.GetHashCode()
    object.GetType()
    object.MemberwiseClone()
    Namespace: SKM.V3.Methods
    Assembly: Cryptolens.Licensing.CrossPlatform.dll
    Syntax
    public static class ProductMethods

    Methods

    | Edit this page View Source

    GetKeys(string, GetKeysModel)

    This method will return a list of keys for a given product. Please keep in mind that although each license key will be of the LicenseKey type, the fields related to signing operations will be left empty. Instead, if you want to get a signed license key (for example, to achieve offline key activation), please use the Activate(string, ActivateModel) instead.

    Declaration
    public static GetKeysResult GetKeys(string token, GetKeysModel parameters)
    Parameters
    Type Name Description
    string token

    The access token. Read more at https://app.cryptolens.io/docs/api/v3/Auth

    GetKeysModel parameters

    The parameters that the method needs.

    Returns
    Type Description
    GetKeysResult

    A BasicResult or null.

    Remarks
    • The fields SignDate and Signature will be empty. Please use Activation in order to get each license signed.
    • The order by field has the following structure: fieldName[ascending | descending]. For example, If you want to order by the feature field 1 (F1), you should use F1.If you want it in descending order, please add the descending keywords right after the field, eg.F1 descending. The ascending keyword is the default, hence optional.
    • The search query field accepts the same queries as the search box on the product page.You can read about the format here.
    • The key lock does not have any effect on this method, eg.you will still be able to retrieve all keys even if the key lock is set to a certain key.
    Examples
    Private Sub GetKeysExample()
    Dim parameters = New GetKeysModel() With {
        .ProductId = 3,
        .Page = 1
    }
    Dim auth = "{access token with GetKeys permission and optional product lock}"
    Dim result = Product.GetKeys(token:=auth, parameters:=parameters)
    If (result IsNot Nothing AndAlso result.Result = ResultType.Success) Then
        ' successful 
        ' displays the first 99 keys of the product.
        ' simply increment Page to 2 in order to get
        ' the rest.
        For Each key As LicenseKey In result.LicenseKeys
            Console.WriteLine(key.Key)
        Next
    End If
    | Edit this page View Source

    GetProducts(string, RequestModel)

    Declaration
    public static GetProductsResult GetProducts(string token, RequestModel parameters)
    Parameters
    Type Name Description
    string token
    RequestModel parameters
    Returns
    Type Description
    GetProductsResult
    • Edit this page
    • View Source
    In this article
    Back to top Copyright © Cryptolens AB