Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

Add 2 parameters to the request in order to get To receive a pre-authorized and signed links to video streams (both live and archive video):

...

link to the camera (to receive both live or archived video), you must:

  • Execute a request to get a token;
  • Execute a request for the received token.

General request format to get a token:

GET http://IP-address:port/web2/secure/video/action.do?version={version}&sessionid={sessionid}&video_in={video_in}&enable_token_auth={enable_token_auth}&valid_token_hours={valid_token_hours}&login={login}&password={password}

Request parameters:

Parameter

Is required

Description

versionYes

See Product version

video_inYesCamera ID in the format "TYPE:ID", for example "CAM:1"
sessionidNoSession ID
targetidYesMatches cam.id
login NoIntellect username, if set
passwordNoIntellect user password, if set
enable_token_authYes Enable authorization by token =1.
valid_token_hours

...

No

Signature validation time (in hours). The maximum value is a week. 

The default value is 12 hours.

Login and password are to be specified in order to receive token.

...

Example request:

httpGET http://127.0.0.1:8085/web2/secure/video/action.do?version=4.10.0.0&sessionid=FC126734&video_in=CAM:1&enable_token_auth=1&valid_token_hours=1&login=1USER&password=1PASS

Response:

Example response:

Code Block
languagexml
{
"path" : "action.do?hmac=GAqUa429sjY2E9jCTpuYeaMqReW3Y7HI"
}

To get the video by this token, use a request like this:

General request format for the received token:

GET http://

...

IP-address:{port}/action.do?hmac=

...

{hmac}

Request parameters:

Parameter

Is required

Description

portYesPort number specified for HTTP Server connection on the Web server object settings panel (see Setting the parameters of connecting Clients to the Web-server).
hmacYes

Token

Example request:

GET http://127.0.0.1:8085/action.do?hmac=GAqUa429sjY2E9jCTpuYeaMqReW3Y7HI