All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.netease.yidun.sdk.auth.mobilenumber.name.v1.MobileNumberOwnerNameCheckDemo Maven / Gradle / Ivy

There is a newer version: 1.4.9
Show newest version
package com.netease.yidun.sdk.auth.mobilenumber.name.v1;

import com.netease.yidun.sdk.AbstractDemo;
import com.netease.yidun.sdk.auth.mobilenumber.MobileNumberOwnerCheckClient;

/**
 * 手机号二要素
 */
public class MobileNumberOwnerNameCheckDemo extends AbstractDemo {

    public static void main(String[] args) {
        MobileNumberOwnerCheckClient client = new MobileNumberOwnerCheckClient("secretId", "secretKey");
        // 如需自定义请求器参数,可使用参考如下方式创建ClientProfile,然后创建client
//        ClientProfile profile = createProfile("secretId", "secretKey");
//        MobileNumberOwnerCheckClient client = new MobileNumberOwnerCheckClient(profile);
        MobileNumberOwnerNameCheckRequest request = new MobileNumberOwnerNameCheckRequest("businessId");
        request.setName("张三");
        request.setPhone("123456");
        request.setNonce("3e4235a28d4c4129953ff7751abb664e");

        MobileNumberOwnerNameCheckResponse response = null;
        try {
            response = client.checkMobileNumberOwnerName(request);
        } catch (Exception e) {
            e.printStackTrace();
        }
        if (response != null && response.getCode() == 200) {
            MobileNumberOwnerNameCheckResult result = response.getResult();
            // data 数据即为所需的check结果
        }
    }
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy