Authorization Interface

Authorization Interface

For authorization process, please refer to Chapter How to authorize.

Windows/Linux/Arm_Linux interface is described here, for Android interface please refer to Android Interface Description.

stid_face_professional_online_activate_license

Function: Activate license online. Return the activated license content. Calling this function requires network; synchronous network requests are possible. Depending on network conditions, time consumed may be different. This interface is the only SDK interface that requires networking connection.

This interface does not need to be called when using offline authorization.

Declaration:

STID_SDK_API
stid_result_t
stid_face_professional_online_activate_license(
    const char *inactive_license_content,
    char** out_activated_license_content
);

Parameters:

  • [in] inactive_license_content: Input an unactivated license string, which need to be read from an unactivated license file.

  • [out] out_activated_license_content: Return the activated license content. Need to call stid_license_release_content interface to release.

Return:

  • [return] Return STID_OK if successful, otherwise return error code.

Note: The activation only needs to be performed once on each machine. The returned activated license content can be saved permanently. For subsequent SDK runs, you only need to load the activated license into the load_license_content interface.

stid_face_professional_load_license_content

Function: Load license content (string).

Declaration:

STID_SDK_API
stid_result_t
stid_face_professional_load_license_content(
    const char* license_content
);

Parameters:

  • [in] license_content: input license string, support offline verified license or activated license (returned by online_activate_license interface).

Return:

  • [return] Return STID_OK if successful, otherwise return error code (for the same product that is loaded for multiple times, STID_E_PRODUCT_LICENSE_LOADED will be returned).

stid_license_release_content

Function: Release license content, such as activated license.

Declaration:

STID_SDK_API
void
stid_license_release_content(
    const char* content
);

Parameters:

  • [in] Content: license content to be released.

Return: None.

Last updated