import com.baidubce.http.ApiExplorerClient; import com.baidubce.http.AppSigner; import com.baidubce.http.HttpMethodName; import com.baidubce.model.ApiExplorerRequest; import com.baidubce.model.ApiExplorerResponse; // 企业二要素验证 Java示例代码 public class RequestDemo { public static void main(String[] args) { String path = "http://gwgp-5tocbjh59ye.n.bdcloudapi.com/v2/company/two/check"; ApiExplorerRequest request = new ApiExplorerRequest(HttpMethodName.GET, path); request.setCredentials("您的 access key", "您的 secret key"); request.addHeaderParameter("Content-Type", "application/json;charset=UTF-8"); request.addQueryParameter("creditNo", ""); request.addQueryParameter("companyName", ""); request.addQueryParameter("legalPerson", ""); ApiExplorerClient client = new ApiExplorerClient(new AppSigner()); try { ApiExplorerResponse response = client.sendRequest(request); // 返回结果格式为Json字符串 System.out.println(response.getResult()); } catch (Exception e) { e.printStackTrace(); } } }
点击复制代码
随着人工智能的快速发展,智慧数据为企业服务打造出了新的入口,而最为瞩目的便是API,因其成本低、接入快等的一系列特点,其应用场景也在不断的增多。数链云API结合市场需求与自身技术,特推出了多种实名认证API产品服务。