Get started
  • English
  • 简体中文
Official Site
Get started
  • English
  • 简体中文
Official Site
  • Get started
  • Concepts
    • Sub-accounts and policies
    • OAuth 2.0 authorization
    • Tokens
    • Devices
    • Device capability model
    • Cloud live (HLS) notes
    • Device messages
    • Media security
    • Glossary
    • Cloud live
    • Cloud storage packages
    • Resource pool quota
  • Guides
  • Device capabilities & events
  • API reference
  • SDK and tools
  • Solutions
  • Platform and support
On this page
Administrator accessToken
Sub-account token
kitToken
Exposure boundary

Tokens

Tokens

Three credentials appear in overseas integrations. They are not interchangeable.

Administrator accessToken

How you get itaccessToken with AppId / AppSecret. Host: https://openapi-[DataCenter].easy4ip.com/openapi/accessToken.
Lifetime3 days. Refresh when it is about to expire or the API returns TK1002. Each token has an independent 3-day life; do not mint one per request.
Where it livesYour server or secrets manager only.
What it can doOpenAPI calls for the developer account, including v2 capabilities and push configuration.

Do not give this token to app users. A leak can operate every device on the account. See Sub-accounts and policies.

Sub-account token

How you get itsubAccountToken with the administrator token and the sub-account openid. Host: https://openapi-[DataCenter].easy4ip.com/openapi/subAccountToken.
LifetimeThe method returns expireTime in seconds. This book does not state a fixed calendar length beyond that field.
Where it livesYour server, then the client that must act as that user.
What it can doOnly the devices and permission identifiers granted by the policy.

Create the sub-account and attach policies first: Account APIs. Prefix in the sample is St_.

kitToken

How you get itServer-side getKitToken at https://openapi-[DataCenter].easy4ip.com/openapi/getKitToken. Protocol: JavaScript development §1.5.
Lifetime2 hours. Cache about one hour in your service. expireTime in the sample is remaining seconds (7199).
Where it livesMinted on the server, then passed to ImouPlayer. Never computed in the browser.
What it can doLight-app play for the deviceId / channelId / type you requested (0 all, 1 live, 2 playback, 6 PTZ).

The player field named token is this kitToken, not the administrator accessToken.

Exposure boundary

CredentialBrowser / app packageYour server
AppSecretNeverRequired to sign
Administrator accessTokenNeverCache until near expiry
Sub-account tokenOnly the matching end userIssue after policy grant
kitTokenYes, after your ACLCache about one hour
HLS / RTMP URLTreat as a shareable secretCreate again when it expires

HLS / RTMP rules: Cloud live from an AppId.

OAuth 2.0 authorization
Devices