ApsaraVideo MediaBox SDK uses licenses to authorize the use of different modules including ApsaraVideo Push SDK, the short video SDK, ApsaraVideo Player SDK, and Queen SDK. You can manage the licenses for different modules in the Intelligent Media Services (IMS) console. A license for ApsaraVideo MediaBox SDK is bound to an application. You can bind each license to only one application in Android and iOS.

(Optional) Grant permissions to a RAM user

If you integrate ApsaraVideo MediaBox SDK in the IMS console as a RAM user, you must be granted relevant permissions before you can manage licenses in the IMS console as the RAM user.
Note If you use an Alibaba Cloud account to integrate ApsaraVideo MediaBox SDK, skip this section and directly obtain a license. For more information, see Obtain a license.
  1. Log on to the RAM console with an Alibaba Cloud account.
  2. In the left-side navigation pane, choose Identities > Users.
  3. On the Users page, find the RAM user to which you want to attach the custom policy, and click Add Permissions in the Actions column.
  4. In the Add Permissions panel, grant the required permissions to the RAM user.
    1. Select the authorization scope.
      • Alibaba Cloud Account: The permissions take effect on the current Alibaba Cloud account.
      • Specific Resource Group: The permissions take effect in a specific resource group.
        Note If you select Specific Resource Group for Authorized Scope, you must make sure that the required cloud service supports resource groups. For more information, see Services that work with Resource Group.
    2. Specify the principal.
      The principal is the RAM user to which you want to grant permissions.
    3. In the Select Policy section, assign the policies in the following table to the RAM user:
      Policy nameDescription
      AliyunICEFullAccessProvides full access to IMS.
      AliyunBSSOrderAccessGrants the permissions to view orders, pay for orders, and cancel orders in the Billing Management console.
  5. Click OK.
  6. Click Complete.

Obtain a license

  1. Log on to the IMS console.
  2. In the top navigation bar, select a region from the drop-down list.
  3. In the left-side navigation pane, choose SDK Management > My Licenses.
  4. On the My Licenses page, click Create Application and Bind License.
    Note You need to apply for a license when you integrate ApsaraVideo MediaBox SDK. The license is strongly associated with the bundle ID of an iOS application or the package name of an Android application. Make sure that the application information is correct when you create a license.
  5. Configure the application parameters based on your business requirements. The following table describes the parameters. After the parameters are configured, click Next.
    ParameterDescription
    Application TitleThe application name. The name can be up to 128 characters in length and can contain letters, digits, and underscores (_). Special characters such as spaces are not supported.
    PlatformThe operating system on which the application runs. Valid values: Android and iOS.
    Package NameThe package name of the Android application. The package name can be up to 128 characters in length. The name can contain letters, digits, underscores (_), and periods (.). Special characters such as spaces are not supported.
    Note This parameter is required if you select Android for Platform.
    Signature (MD5)The MD5 value of the Android application signature. You can run the keytool -v -list -keystore your.keystore command to query the MD5 value of the signature. This parameter is optional. The value is 32 characters in length and can contain only lowercase letters and digits.
    Note
    • We recommend that you add a signature to a license to prevent license theft.
    • If you add a signature, the following SDK versions ignore MD5 signature verification: ApsaraVideo MediaBox SDK V1.7.0 or later, ApsaraVideo Player SDK V5.5.2 or later, and ApsaraVideo Push SDK V4.4.9 or later.
    Bundle IDThe bundle ID of the iOS application. The ID can be up to 128 characters in length and can contain letters, digits, underscores (_), and periods (.). Special characters such as spaces are not supported.
    Note This parameter is required if you select iOS for Platform.
  6. Select the module that you want to use and click Next.
    Note
    • You can select Trial Version (Validity Period: 1 Month) or Official Version (Validity Period: 1 Year) for each module. You can apply to use a trial version for each module only once per application.
    • Multiple editions of the short video SDK and Queen SDK are available, with the basic edition selected by default for each. You can select another edition based on your business requirements.
    • You cannot change the edition of the ApsaraVideo Player SDK or Push SDK. By default, the standard edition is selected for the ApsaraVideo Player SDK, and the basic/interactive edition is selected for ApsaraVideo Push SDK.
    • You can purchase the professional edition of the short video SDK by using one of the following methods:
      • Purchase the professional edition of the short video SDK in the console. By default, all features are purchased if you use this method.
      • If you do not want to purchase some features, click this link to purchase only some features of the professional edition of the short video SDK. After you purchase the professional edition of the short video SDK, apply for a license for the professional edition by filling in an application form. Alibaba Cloud will send the review results to you by email.
  7. Confirm your application information and click Create to create the application.
    To modify the application information, click Previous to return to the configuration page.
What to do next

After the application is created, you can perform the following operations on the application from the My Licenses page: Download the license file, view the license key, renew the application license, or modify the binding relationship.

Common issues

MD5 signature modification for Android applications

Modifying the MD5 signature may cause unexpected problems. We recommend that you exercise caution when you perform this operation. If you want to integrate the application with ApsaraVideo MediaBox SDK, you need to configure the license file and key. Modifying existing authorization configurations such as the MD5 signature can cause a failure in SDK authorization verification for the published versions of the application. If this happens, the application cannot work as expected. The following scenarios describe the common issues you may run into when you modify the MD5 signature of an Android application:

  • If you change the MD5 signature from A to B, the application displays an error prompt indicating that the MD5 signature is A. In this case, we recommend that you create another application that has the same package name as the existing application and specify B as the MD5 signature of the new application.
  • If you clear the Add Signature check box, earlier versions of the SDKs will fail SDK authorization verification. If the application has used one of the following SDK versions, we recommend that you do not unbind the signature:
    • ApsaraVideo MediaBox SDK V1.6.0 and earlier
    • ApsaraVideo Player SDK V5.5.1.0 and earlier
    • ApsaraVideo Push SDK V4.4.8 and earlier