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.
ImportantKey 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
Log on to the Phone Number Verification Service console.
In the navigation pane on the left, choose Phone Number Verification Service > Plan Management.
Click Add Phone Number Verification Plan.
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.
NoteUse 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 iswww.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.
NoteWhen 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.
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.
After a plan is deleted, you can no longer use it to initiate authentication. Perform this operation with caution.