验证码识别-包月版

本产品适用于纯数字、纯英文、英文数字组合的图片验证码,毫秒级响应,识别率高,无限量调用。
注意:第一次下单请咨询客服。

  • 2200元 / 月
  • 2200.0
  • 支付宝
  • 暂无。
  • 免费试用

    免费提供试用服务
    满意再下单

  • 服务保障

    客服极速响应
    快速解决客户问题

  • 技术支持

    专业技术团队
    为客户提供技术支持

API接口
  • 验证码识别-包月版接口

包月验证码识别

接口地址:查看:个人中心-包月服务-接口地址

请求方式:POST

返回类型:JSON

请求参数(Headers)
名称 类型 是否必须 描述
appCode STRING 必选 包月服务AppCode
请求参数(Body)
名称 类型 是否必须 描述
v_pic STRING 必选 验证码图片 base64加密字符串,可以参考:https://tool.css-js.com/base64.html
请求示例
  • curl
  • Java
  • C#
  • PHP
  • Python
  • ObjectC
curl -i -X POST '包月url' -H 'Authorization:APPCODE 包月服务的AppCode' --data 'v_pic=v_pic'
public static void main(String[] args) {
	String host = "包月host";
	String path = "包月path";
	String method = "POST";
	String appcode = "包月的AppCode";
	Map headers = new HashMap();
	headers.put("Authorization", "APPCODE " + appcode);
	headers.put("Content-Type", "application/x-www-form-urlencoded; charset=UTF-8");
	Map querys = new HashMap();
	Map bodys = new HashMap();
	bodys.put("v_pic", "图片base64加密后的字符串");
	try {
		/**
		* 重要提示如下:
		* HttpUtils请从
		* https://github.com/aliyun/api-gateway-demo-sign-java/blob/master/src/main/java/com/aliyun/api/gateway/demo/util/HttpUtils.java
		* 下载
		*
		* 相应的依赖请参照
		* https://github.com/aliyun/api-gateway-demo-sign-java/blob/master/pom.xml
		*/
		HttpResponse response = HttpUtils.doPost(host, path, method, headers, querys, bodys);
		System.out.println(response.toString());
		//获取response的body
		//System.out.println(EntityUtils.toString(response.getEntity()));
	} catch (Exception e) {
		e.printStackTrace();
	}
}
	    													
//using System.IO;
//using System.Text;
//using System.Net;
//using System.Net.Security;
//using System.Security.Cryptography.X509Certificates;

        private const String url = "包月url";
        private const String method = "POST";
        private const String appcode = "包月的AppCode";

        static void Main(string[] args)
        {
            String querys = "";
            String bodys = "v_pic="+v_pic.Replace("+", "%2B");;
            HttpWebRequest httpRequest = null;
            HttpWebResponse httpResponse = null;

            if (0 < querys.Length)
            {
                url = url + "?" + querys;
            }

            if (host.Contains("https://"))
            {
                ServicePointManager.ServerCertificateValidationCallback = new RemoteCertificateValidationCallback(CheckValidationResult);
                httpRequest = (HttpWebRequest)WebRequest.CreateDefault(new Uri(url));
            }
            else
            {
                httpRequest = (HttpWebRequest)WebRequest.Create(url);
            }
            httpRequest.Method = method;
            httpRequest.Headers.Add("Authorization", "APPCODE " + appcode);
            //根据API的要求,定义相对应的Content-Type
            httpRequest.ContentType = "application/x-www-form-urlencoded; charset=UTF-8";
            if (0 < bodys.Length)
            {
                byte[] data = Encoding.UTF8.GetBytes(bodys);
                using (Stream stream = httpRequest.GetRequestStream())
                {
                    stream.Write(data, 0, data.Length);
                }
            }
            try
            {
                httpResponse = (HttpWebResponse)httpRequest.GetResponse();
            }
            catch (WebException ex)
            {
                httpResponse = (HttpWebResponse)ex.Response;
            }

            Console.WriteLine(httpResponse.StatusCode);
            Console.WriteLine(httpResponse.Method);
            Console.WriteLine(httpResponse.Headers);
            Stream st = httpResponse.GetResponseStream();
            StreamReader reader = new StreamReader(st, Encoding.GetEncoding("utf-8"));
            Console.WriteLine(reader.ReadToEnd());
            Console.WriteLine("\n");

        }

        public static bool CheckValidationResult(object sender, X509Certificate certificate, X509Chain chain, SslPolicyErrors errors)
        {
            return true;
        }
<?php
    $url = "包月url";
    $method = "POST";
    $appcode = "包月的AppCode";
    $headers = array();
    array_push($headers, "Authorization:APPCODE " . $appcode);
    //根据API的要求,定义相对应的Content-Type
    array_push($headers, "Content-Type".":"."application/x-www-form-urlencoded; charset=UTF-8");
    $querys = "";
    $bodys = "v_pic=v_pic";

    $curl = curl_init();
    curl_setopt($curl, CURLOPT_CUSTOMREQUEST, $method);
    curl_setopt($curl, CURLOPT_URL, $url);
    curl_setopt($curl, CURLOPT_HTTPHEADER, $headers);
    curl_setopt($curl, CURLOPT_FAILONERROR, false);
    curl_setopt($curl, CURLOPT_RETURNTRANSFER, true);
    curl_setopt($curl, CURLOPT_HEADER, false);
    if (1 == strpos("$".$host, "https://"))
    {
        curl_setopt($curl, CURLOPT_SSL_VERIFYPEER, false);
        curl_setopt($curl, CURLOPT_SSL_VERIFYHOST, false);
    }
    curl_setopt($curl, CURLOPT_POSTFIELDS, $bodys);
    echo curl_exec($curl);
?>

import urllib, urllib2, sys

url = '包月url'
method = 'POST'
appcode = '包月的AppCode'
querys = ''
bodys = {}

bodys['v_pic'] = '''v_pic'''
post_data = urllib.urlencode(bodys)
request = urllib2.Request(url, post_data)
request.add_header('Authorization', 'APPCODE ' + appcode)
//根据API的要求,定义相对应的Content-Type
request.add_header('Content-Type', 'application/x-www-form-urlencoded; charset=UTF-8')
response = urllib2.urlopen(request)
content = response.read()
if (content):
    print(content)
NSString *appSecret = @"包月的AppSecret";
NSString *method = @"POST";
NSString *querys = @"";
NSString *url = @"包月url";
NSString *bodys = @"v_type=v_type";

NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString: url]  cachePolicy:1  timeoutInterval:  5];
request.HTTPMethod  =  method;
[request addValue:  [NSString  stringWithFormat:@"APPCODE %@" ,  appcode]  forHTTPHeaderField:  @"Authorization"];
[request addValue: @"application/x-www-form-urlencoded; charset=UTF-8" forHTTPHeaderField: @"Content-Type"];
NSData *data = [bodys dataUsingEncoding: NSUTF8StringEncoding];
[request setHTTPBody: data];
NSURLSession *requestSession = [NSURLSession sessionWithConfiguration:[NSURLSessionConfiguration defaultSessionConfiguration]];
NSURLSessionDataTask *task = [requestSession dataTaskWithRequest:request
    completionHandler:^(NSData * _Nullable body , NSURLResponse * _Nullable response, NSError * _Nullable error) {
    NSLog(@"Response object: %@" , response);
    NSString *bodyString = [[NSString alloc] initWithData:body encoding:NSUTF8StringEncoding];

    //打印应答中的body
    NSLog(@"Response body: %@" , bodyString);
    }];

[task resume];
正常返回示例
{
  "msg": "查询成功!",
  "recognizeId": "cus_2583",
  "v_code": "37PW",
  "errCode": 0
}
错误码定义
错误码 错误信息 描述
0 查询成功! 查询成功!
101 接口参数错误! 接口参数错误!
102 接口错误! 接口错误!
指定颜色文字识别(内容)

周一至周五 9:00-18:00

尖叫网络

尖叫数据