Phone Number Verification Service

更新时间:
复制 MD 格式

A phone number verification plan identifies an authentication scenario within an app. Each plan typically corresponds to information such as an app's package name and package signature. When an API is called, the system requires the corresponding plan code, package name, package signature, and BundleID. This topic describes how to add and delete phone number verification plans.

Usage notes

  • If your client is on iOS, Android, or HarmonyOS, an Alibaba Cloud phone number verification key is generated after you create a plan. This key is a required input parameter when you use the software development kit (SDK). You must store this key securely on your app's server-side.

    Important

    Key generation is an asynchronous operation. You may need to refresh the page to view the key. Due to the internal implementation of China Mobile, numbers from this carrier can be used only 10 minutes after the key is generated.

  • When you integrate H5-based local number verification, the back end uses different plans to identify different H5 page authentication procedures.

  • Phone number verification plans cannot be modified after they are created.

Add a phone number verification plan

  1. Log on to the Phone Number Verification Service console.

  2. In the navigation pane on the left, choose Phone Number Verification Service > Plan Management.

  3. Click Add Phone Number Verification Plan.

  4. Set the plan parameters as instructed on the page.

    Client

    Description

    Android

    Enter the plan name, app name, package name, package signature, and plan type.

    iOS

    Enter the plan name, app name, BundleID, and plan type.

    Harmony

    Enter the plan name, app name, package name, package signature, AppId, and plan type.

    Note

    Use the following official HarmonyOS code to get application properties, such as the package name, package signature, and AppId.

    bundleManager.getBundleInfoForSelf(bundleManager.BundleFlag.GET_BUNDLE_INFO_WITH_SIGNATURE_INFO).then((bundleInfo) => {
      const packageName = bundleInfo.name
      console.log("numberauth:pagname:" + packageName)
      const sign = bundleInfo.signatureInfo.fingerprint
      console.log("numberauth:sign:" + sign)
      const appIdentifier = bundleInfo.signatureInfo.appIdentifier
      console.log("numberauth:appid:" + appIdentifier)
    })

    H5

    Enter the plan name, page URL, source URL, and plan type.

    For example, if the page that requires authentication is https://www.aliyun.com/resources/html/contract.html, the domain name is www.aliyun.com.
    • The page URL format is "Protocol + // + Domain Name + /". For example: https://www.aliyun.com/.

    • The source URL format is "Protocol + // + Domain Name". For example: https://www.aliyun.com.

    Note

    When the client is H5, due to carrier control requirements, the phone number verification feature for China Mobile numbers can be invoked only on the second business day after the plan is created. The specific effective time is subject to carrier approval.

  5. Click OK.

    On the Plan Management page, you can view the new plan to retrieve the plan code. In the Actions column, click Details to view the plan details.

Delete a phone number verification plan

After a verification plan is created, its information cannot be modified. To make changes, you must delete the original plan, create a new one, and then integrate the new plan using its parameters.

On the Plan Management page, click Delete in the Actions column to delete the verification plan.

Important

After a plan is deleted, you can no longer use it to initiate authentication. Perform this operation with caution.