Click or drag to resize

KeyDeactivate Method

This method will 'undo' a key activation with a certain machine code. The key should not be blocked, since otherwise this method will throw an error. https://serialkeymanager.com/docs/api/v3/Deactivate

Namespace:  SKM.V3.Methods
Assembly:  SKM (in SKM.dll) Version: 4.0.2.6 (4.0.2.6)
Syntax
public static BasicResult Deactivate(
	string token,
	DeactivateModel parameters
)

Parameters

token
Type: SystemString
The access token. Read more at https://serialkeymanager.com/docs/api/v3/Auth
parameters
Type: SKM.V3.ModelsDeactivateModel
The parameters that the method needs.

Return Value

Type: BasicResult
A BasicResult or null.
Examples
Deactivation example
var auth = "{access token with permission to access the deactivate method}"
var result = Key.Deactivate(token: auth, parameters: new DeactivateModel() 
{
        Key = "GEBNC-WZZJD-VJIHG-GCMVD", 
        ProductId = 3349,
        MachineCode = SKGL.SKM.getMachineCode(SKGL.SKM.getSHA1);
});

if(result == null || result.Result == ResultType.Error)
{
    // could not deactivate. maybe it has already been deactivated.
    // more information can be found in the message.
}

// everything went fine if we are here!
See Also