图片验证码生成
服务商: 昆明秀派科技有限公司
电话: 400-998-8033
QQ: 3007663665
邮箱: services@showapi.com
生成验证码图片,和图片中对应的文本信息
参数名称 | 类型 | 默认值 | 示例值 | 必须 | 描述 |
---|---|---|---|---|---|
border | String | yes | 否 | 图片边框,合法值:yes , no | |
border_color | String | black |
105,179,90
|
否 | 边框颜色,合法值: r,g,b (and optional alpha) 或者 white,black,blue. |
border_thickness | String | 1 | 否 | 边框厚度,合法值:0 | |
image_width | String | 200 | 否 | 图片宽 | |
image_height | String | 50 | 否 | 图片高 | |
textproducer_char_string | String | abcde2345678gfynmnpwx | 否 | 文本集合,验证码值从此集合中获取,默认值为英文字母+数字+2500个常用汉字 | |
textproducer_char_length | String | 4 | 否 | 验证码长度,也就是几个字符 | |
textproducer_font_names | String | Arial, Courier | 否 | 字体 | |
textproducer_font_size | String | 40 | 否 | 字体大小 | |
textproducer_font_color | String | black |
105,179,90
|
否 | 字体颜色,合法值: r,g,b 或者 white,black,blue. |
textproducer_char_space | String | 2 | 否 | 文字间隔 | |
noise_color | String | black |
105,179,90
|
否 | 干扰颜色,合法值: r,g,b 或者 white,black,blue. |
obscurificator_impl | String | com.google.code.kaptcha.impl.WaterRipple | 否 | 图片样式: 水纹com.google.code.kaptcha.impl.WaterRipple 鱼眼com.google.code.kaptcha.impl.FishEyeGimpy 阴影com.google.code.kaptcha.impl.ShadowGimpy |
参数名称 | 类型 | 示例值 | 描述 |
---|---|---|---|
img_path | String |
http://img.showapi.com/images/temp/2.jpg
|
生成的图片路径 |
text | String |
2n23
|
此验证码图片实际代表的文字 |
ret_code | Number |
0
|
是否成功 |
{
"showapi_res_code": 0,
"showapi_res_error": "",
"showapi_res_id":"ce135f6739294c63be0c021b76b6fbff",
"showapi_res_body": {
"img_path": "http://img.showapi.com/images/temp/2.jpg",
"text": "中文验证",
"ret_code": "0"
}
}
参数名称 | 类型 | 示例值 | 描述 |
---|---|---|---|
showapi_res_body | String | {"city":"昆明","prov":"云南"} | 消息体的JSON封装,所有应用级的返回参数将嵌入此对象 。 |
showapi_res_code | int | 0 | 查看错误码 |
showapi_res_error | String | 用户输入有误! | 错误信息的展示 |
showapi_res_id | String | ce135f6739294c63be0c021b76b6fbff | 本次请求id |
状态码 | 描述 |
---|---|
0 | 成功 |
-1 | 系统调用错误 |
-2 | 可调用次数或金额为0 |
-3 | 读取超时 |
-4 | 服务端返回数据解析错误 |
-5 | 后端服务器DNS解析错误 |
-6 | 服务不存在或未上线 |
-7 | API创建者的网关资源不足 |
-3 | 读取超时 |
-1000 | 系统维护 |
-1002 | showapi_appid字段必传 |
-1003 | showapi_sign字段必传 |
-1004 | 签名sign验证有误 |
-1005 | showapi_timestamp无效 |
-1006 | app无权限调用接口 |
-1007 | 没有订购套餐 |
-1008 | 服务商关闭对您的调用权限 |
-1009 | 调用频率受限 |
-1010 | 找不到您的应用 |
-1011 | 子授权app_child_id无效 |
-1012 | 子授权已过期或失效 |
-1013 | 子授权ip受限 |
-1014 | token权限无效 |