POST /xxx/xxxx HTTP/1.1
Host:api2.hik-cloud.com
Content-Type:application/x-www-form-urlencoded; charset=utf-8
Authorization:bearer 62c54b72-c85f-4a4e-8fd0-6941744d0af7
属性名称 | 属性描述 | 类型 | 是否必填 | 备注 |
---|---|---|---|---|
client_id | 客户端ID | String | 是 | 使用云眸账号登录开放平台门户网站open2.hik-cloud.com,进入开发者服务查看获取 |
client_secret | 访问密钥 | String | 是 | 使用云眸账号登录开放平台门户网站open2.hik-cloud.com,进入开发者服务查看获取 |
grant_type | 认证模式 | String | 是 | 只支持传入”client_credentials” |
scope | 权限范围 | String | 否 | 可选填”app” |
属性名称 | 属性描述 | 类型 | 是否必填 |
---|---|---|---|
access_token | 访问令牌 | String | 是 |
token_type | 令牌类型 | String | 是 |
expires_in | 过期时间(秒) | Long | 是 |
scope | 权限范围 | String | 是 |
POST /oauth/token HTTP/1.1
Host:api2.hik-cloud.com
Content-Type:application/x-www-form-urlencoded
client_id=a4f********b324&client_secret=0b********df59e68&grant_type=client_credentials&scope=app
{
"access_token": "62c54b72-c85f-4a4e-8fd0-6941744d0af7",
"token_type":"bearer",
"expires_in": 43199,
"scope":"app"
}