HTTPS检测
最后更新于:2022-04-02 08:18:45
## HTTPS检测
![](https://docs.gechiui.com/gc-content/uploads/sites/kancloud/c5/84/c58473d96206baf0c01063a9b7f35afa_200x200.png)
> 查询域名是否支持https协议及SSL证书信息
## 接口费用( [点击购买](https://market.topthink.com/product/221))
> 最低 0.001元/次
## 接口调用([调用须知](https://docs.topthink.com/think-api/1835086))
### 请求地址
```
GET https://api.topthink.com/website/https
```
### 请求参数
| 名称 | 类型 | 必填 | 说明 |
| --- | --- | --- | --- |
| appCode| string| 是|用户授权码,参考[API调用](https://docs.topthink.com/think-api/1835086) |
| domain| string | 是 | 域名 |
### 返回`data`参数
| 名称 | 类型 | 示例值 | 说明 |
| --- | --- | --- | --- |
| generic\_name | string | baidu.com | 通用名称,一般为被检测域名 |
| operation\_organ | string | Beijing Baidu Netcom Science Technology Co.,Ltd | 运营方 |
| issuing\_auth | string | Global Signnv-sa | 颁发机构 |
| issuedby | string | Global SignOrganization Validation CA-SHA256-G2 | 颁发者 |
| sn | string | RSA-SHA256 | 签名加密方式 |
| ssl\_type | string | OV | 证书类型,目前只能检测域名型DV和企业型OV |
| isssl | int | 1 | 是否存在ssl证书,1存在,0不存在(不支持https) |
| isexpire | int | 0 | 证书是否过期,1过期,0未过期 |
| ssl\_start | string | 2020-04-02 15:04:58 | 证书有效开始时间 |
| ssl\_end | string | 2021-07-26 13:31:02 | 证书无效到期时间 |
## SDK调用
```
$client = new Client("YourAppCode");
$result = $client->websiteHttps()
->withDomain('baidu.com')
->request();
```
返回示例:
~~~
{
"code":0,
"message": "成功",
"data": [
{
"generic_name":"baidu.com",
"operation_organ":"Beijing Baidu Netcom Science Technology Co.,Ltd",
"issuing_auth":"Global Signnv-sa",
"issuedby":"Global SignOrganization Validation CA-SHA256-G2",
"sn":"RSA-SHA256",
"ssl_type":"OV",
"isssl":1,
"isexpire":0,
"ssl_start":"2020-04-02 15:04:58",
"ssl_end":"2021-07-26 13:31:02"
}
]
}
~~~
';