...
All information that a camera needs to know is encrypted in an ACCESS TOKEN. This is how a camera can get an ACCESS TOKEN on start.
#1.
User types a MAC address (or any other camera ID) and password
The back-end creates new channels or obtains an access token for an existing channel
The back-end sends the MAC address, password and the access_token to VXG Provisioning service.
...
Unpack a camera.
Log in and click "Add camera" in Web UI or Mobile App.
Enter the MAC address and password.
Wait for 30 seconds.
Start watching live video.
API calls and sequence
...
The camera uses this API to get an access token from VXG service using Serial ID and password.
...
.
...
API : /v1/camera/get_token
Input parameters:
...
serial_id is a unique identifier that the user sees on the camera sticker.
...
password - the camera password that the user sees on the camera sticker upon first launch.
Output parameter :
HTTP responce and access_token
Example:
curl -X POST "https://cameras.vxg.io:443//v1/camera/get_token/" -H "accept: application/json" -H "Content-Type: application/json" -d '{ "serial_id": "XXX-XXX-XXX", "password": "camera_password" }'
Camera operations: new camera, no token, after reset
The camera requests an access token from the VXG service using HTTPS and VXG API. If the server does not return an access token due to the fact that the user did not specify the camera parameters, the camera requests again every minute for 5 minutes and after 5 attempts it requests the token every hour until it receives the token.
Camera operations:
...
The camera has token
The camera should not request an access token if it already has one.
...
Add the camera to the new account (Enter serial number and password)
Reset the camera.
...
Other options
QR code read by a mobile app.
...