Get started
  • English
  • 简体中文
Official Site
Get started
  • English
  • 简体中文
Official Site
  • Get started
  • Concepts
  • Guides
  • Device capabilities & events
  • API reference
    • Public conventions
    • Development specification
    • accessToken: Get administrator token
    • API request example
    • Return codes
    • Interface call limits
    • Account docking
    • Device APIs
    • Device live broadcast
    • Push configuration
    • Cloud storage service
    • Resource pool quota
    • Legacy APIs (deprecated)
  • SDK and tools
  • Solutions
  • Platform and support
On this page
Function details
Request address
Request format
Incoming parameter description
Sample input
Return data field description
Sample output
Error codes
Related

accessToken (accessToken - Get Administrator Token - Imou Open Platform)

accessToken: accessToken - Get Administrator Token - Imou Open Platform

Function details

Obtain the accessToken according to the administrator account appId and appSecret. The appId and appSecret can be found in the console-my application-application information.

Note: The obtained accessToken is valid for 3 days. Please obtain it again when it is about to expire or the interface error TK1002 is reported. Each accessToken has an independent 3-day life cycle. Please do not call frequently to avoid occupying too many interface calls.

Device message callbacks use the same administrator token with Push configuration. See Receive device messages.

v2 capability APIs use the same administrator or sub-account accessToken; see Capability usage.

Request address

https://openapi-[DataCenter].easy4ip.com/openapi/accessToken

Request format

HTTP POST. JSON body layout: Request conventions. Sign with Signature.

Incoming parameter description

No parameters are passed in, and the params value can be an empty map collection

Sample input

{
 "system":{
 "ver":"1.0",
 "appId":"lcdxxxxxxxxx",
 "sign": "xjhCQBoJ9hRDsCjyDcHjtDNzRZ3ZJezcawsfWeiaoxU=",
 "time":1599013514,
 "nonce":"fbf19fc6-17a1-4f73-a967-75eadbc805a2"
 },
 "id":"98a7a257-c4e4-4db3-a2d3-d97a3836b87c",
 "params":{

 }
}

Return data field description

Field nameField typeField description
accessTokenStringAdministrator account accessToken
expireTimeLongThe expiration time of the administrator account accessToken, in seconds

Sample output

{
 "result":{
 "msg":"Successful operation.",
 "code":"0",
 "data":{
 "expireTime":259176,
 "accessToken":"At_00006ac6e32d123141238f60147de7ec"
 }
 },
 "id":"98a7a257-c4e4-4db3-a2d3-d97a3836b87c"
}

Error codes

This method may return the codes below. See Return codes and Capability errors for the full catalog.

Gateway and auth (SN / TK / OP)

CodeMeaningNext step
SN1001Signature errorCheck sign per Development specification
TK1002Token invalid or expiredRefresh accessToken
OP1002Missing required parameterAdd required fields
OP1003Invalid parameterMatch this page’s parameter table
OP1009Permission deniedCheck token and device bind/share grants
OP1013Total call limit exceededReduce call rate
OP1014Daily per-interface limit exceededSee Interface call limits
DV1007Device offlineWait until the device is online

See Return codes · OP/SN/TK for the full catalog.

Related

  • Development specification
  • API conventions
  • Module index
Development specification
API request example