七牛云调用OCR身份证识别接口,Authorization: Qiniu <AccessKey>:<Sign>生成方法

七牛云调用OCR身份证识别接口,Authorization: Qiniu <AccessKey>:<Sign>生成方法

Auth auth = Auth.create(acKey, scKey);
        String signature = auth.signRequestV2("http://ai.qiniuapi.com/v1/ocr/idcard?uri=http://img3.redocn.com/20120528/Redocn_2012052817213559.jpg",
                "POST", null, "application/json");
        String QiniuToken = "Qiniu " + signature;
        Map<String, String> headers = new HashMap<>();
        headers.put("Authorization", QiniuToken);
        String result = HttpKit.post("http://ai.qiniuapi.com/v1/ocr/idcard?uri=http://img3.redocn.com/20120528/Redocn_2012052817213559.jpg", null, "UTF-8", headers);
        System.out.println(result);`

clipboard.png

阅读 3.6k
撰写回答
你尚未登录,登录后可以
  • 和开发者交流问题的细节
  • 关注并接收问题和回答的更新提醒
  • 参与内容的编辑和改进,让解决方法与时俱进
推荐问题
logo
七牛云问答
子站问答
访问
宣传栏