1
1
# BlinkMonitorProtocol
2
- Unofficial documentation for the Client API of the Blink Wire-Free HD Home Monitoring and Alert System.
2
+ Unofficial documentation for the Client API of the Blink Wire-Free HD Home Monitoring & amp ; Alert System.
3
3
4
4
Copied from https://github.com/MattTW/BlinkMonitorProtocol
5
5
6
6
I am not affiliated with the company in any way - this documentation is strictly ** "AS-IS"** . My goal was to uncover enough to arm and disarm the system programatically so that I can issue those commands in sync with my home alarm system arm/disarm. Just some raw notes at this point but should be enough for creating programmatic APIs. Lots more to be discovered and documented - feel free to contribute!
7
7
8
8
The Client API is a straightforward REST API using JSON and HTTPS.
9
9
10
- ## This Document
11
- The purpose here is to describe what is going on behind the scenes, and what commands we know are available to communicate with Blink servers. This is NOT a description of the blinkpy module, but a description of the commands blinkpy relies on to effectively communicate.
12
-
13
10
## Login
14
11
15
12
Client login to the Blink Servers.
@@ -19,20 +16,25 @@ Client login to the Blink Servers.
19
16
> "password" : "* your blink password* ",
20
17
> "client_specifier" : "iPhone 9.2 | 2.2 | 222",
21
18
> "email" : "* your blink login/email* "
22
- > }' --compressed https://prod.immedia-semi.com/login
19
+ > }' --compressed https://rest. prod.immedia-semi.com/login
23
20
24
21
** Response:**
25
- > {"authtoken":{"authtoken":"* an auth token* ","message":"auth"}}
22
+ > {"authtoken":{"authtoken":"* an auth token* ","message":"auth"},"networks":{" * network id * ":{"name":" * name * ","onboarded" : true }},"region":{" * regioncode for endpoint * ":" * region name"} }
26
23
27
24
** Notes:**
28
25
The authtoken value is passed in a header in future calls.
26
+ The region code for endpoint is required to form the URL of the REST endpoint for future calls.
27
+ Depending on the region you are registered you will need to change the REST endpoints below:
28
+ - from ` https://rest.prod.immedia-semi.com `
29
+ - to ` https://rest.prde.immedia-semi.com ` if e.g. your device is registered in Germany
30
+ Please note that at this moment it seems that all regions are not implemented equally: not all endpoints are available in all regions
29
31
30
- ##Networks
32
+ ## Networks
31
33
32
34
Obtain information about the Blink networks defined for the logged in user.
33
35
34
36
** Request:**
35
- > curl -H "Host: prod.immedia-semi.com" -H "TOKEN_AUTH: * authtoken from login* " --compressed https://prod.immedia-semi.com/networks
37
+ > curl -H "Host: prod.immedia-semi.com" -H "TOKEN_AUTH: * authtoken from login* " --compressed https://rest. prod.immedia-semi.com/networks
36
38
37
39
** Response:**
38
40
JSON response containing information including Network ID and Account ID.
@@ -46,7 +48,7 @@ Network ID is needed to issue arm/disarm calls
46
48
Obtain information about the Blink Sync Modules on the given network.
47
49
48
50
** Request:**
49
- > curl -H "Host: prod.immedia-semi.com" -H "TOKEN_AUTH: * authtoken from login* " --compressed https://prod.immedia-semi.com/network/*network_id_from_networks_call*/syncmodules
51
+ > curl -H "Host: prod.immedia-semi.com" -H "TOKEN_AUTH: * authtoken from login* " --compressed https://rest. prod.immedia-semi.com/network/*network_id_from_networks_call*/syncmodules
50
52
51
53
** Response:**
52
54
JSON response containing information about the known state of the Sync module, most notably if it is online
@@ -56,11 +58,11 @@ Probably not strictly needed but checking result can verify that the sync module
56
58
57
59
58
60
## Arm
59
-
61
+
60
62
Arm the given network (start recording/reporting motion events)
61
63
62
64
** Request:**
63
- > curl -H "Host: prod.immedia-semi.com" -H "TOKEN_AUTH: * authtoken from login* " --data-binary --compressed https://prod.immedia-semi.com/network/*network_id_from_networks_call*/arm
65
+ > curl -H "Host: prod.immedia-semi.com" -H "TOKEN_AUTH: * authtoken from login* " --data-binary --compressed https://rest. prod.immedia-semi.com/network/*network_id_from_networks_call*/arm
64
66
65
67
** Response:**
66
68
JSON response containing information about the arm command request, including the command/request ID
@@ -73,7 +75,7 @@ When this call returns, it does not mean the arm request is complete, the clien
73
75
Disarm the given network (stop recording/reporting motion events)
74
76
75
77
** Request:**
76
- > curl -H "Host: prod.immedia-semi.com" -H "TOKEN_AUTH: * authtoken from login* " --data-binary --compressed https://prod.immedia-semi.com/network/*network_id_from_networks_call*/disarm
78
+ > curl -H "Host: prod.immedia-semi.com" -H "TOKEN_AUTH: * authtoken from login* " --data-binary --compressed https://rest. prod.immedia-semi.com/network/*network_id_from_networks_call*/disarm
77
79
78
80
** Response:**
79
81
JSON response containing information about the disarm command request, including the command/request ID
@@ -87,7 +89,7 @@ When this call returns, it does not mean the disarm request is complete, the cl
87
89
Get status info on the given command
88
90
89
91
** Request:**
90
- > curl -H "Host: prod.immedia-semi.com" -H "TOKEN_AUTH: * authtoken from login* " --compressed https://prod.immedia-semi.com/network/*network_id*/command/*command_id *
92
+ > curl -H "Host: prod.immedia-semi.com" -H "TOKEN_AUTH: * authtoken from login* " --compressed https://rest. prod.immedia-semi.com/network/*network_id*/command/*command_id *
91
93
92
94
** Response:**
93
95
JSON response containing state information of the given command, most notably whether it has completed and was successful.
@@ -103,20 +105,20 @@ lv_relay, arm, disarm, thumbnail, clip
103
105
Return information displayed on the home screen of the mobile client
104
106
105
107
** Request:**
106
- > curl -H "Host: prod.immedia-semi.com" -H "TOKEN_AUTH: * authtoken from login* " --compressed https://prod.immedia-semi.com/homescreen
108
+ > curl -H "Host: prod.immedia-semi.com" -H "TOKEN_AUTH: * authtoken from login* " --compressed https://rest. prod.immedia-semi.com/homescreen
107
109
108
110
** Response:**
109
111
JSON response containing information that the mobile client displays on the home page, including: status, armed state, links to thumbnails for each camera, etc.
110
112
111
113
** Notes:**
112
114
Not necessary to as part of issuing arm/disarm commands, but contains good summary info.
113
115
114
- ##Events, thumbnails & video captures
116
+ ## Events, thumbnails & video captures
115
117
116
118
** Request**
117
119
Get events for a given network (sync module) -- Need network ID from home
118
120
119
- > curl -H "Host: prod.immedia-semi.com" -H "TOKEN_AUTH: * authtoken from login* " --compressed https://prod.immedia-semi.com/events/network/*network__id *
121
+ > curl -H "Host: prod.immedia-semi.com" -H "TOKEN_AUTH: * authtoken from login* " --compressed https://rest. prod.immedia-semi.com/events/network/*network__id *
120
122
121
123
** Response**
122
124
A json list of evets incluing URL's. Replace the "mp4" with "jpg" extension to get the thumbnail of each clip
@@ -144,65 +146,65 @@ Note that you replace the 'mp4' with a 'jpg' to get the thumbnail
144
146
** Request**
145
147
Captures a new thumbnail for a camera
146
148
147
- > curl -H "Host: prod.immedia-semi.com" -H "TOKEN_AUTH: * authtoken from login* " --data-binary --compressed https://prod.immedia-semi.com/network/*network_id*/camera/*camera_id*/thumbnail
149
+ > curl -H "Host: prod.immedia-semi.com" -H "TOKEN_AUTH: * authtoken from login* " --data-binary --compressed https://rest. prod.immedia-semi.com/network/*network_id*/camera/*camera_id*/thumbnail
148
150
149
151
** Response**
150
152
Command information.
151
153
152
154
** Request**
153
155
Captures a new video for a camera
154
156
155
- > curl -H "Host: prod.immedia-semi.com" -H "TOKEN_AUTH: * authtoken from login* " --data-binary --compressed https://prod.immedia-semi.com/network/*network_id*/camera/*camera_id*/clip
157
+ > curl -H "Host: prod.immedia-semi.com" -H "TOKEN_AUTH: * authtoken from login* " --data-binary --compressed https://rest. prod.immedia-semi.com/network/*network_id*/camera/*camera_id*/clip
156
158
157
159
** Response**
158
160
Command information.
159
161
160
- ##Video Information
162
+ ## Video Information
161
163
162
164
** Request**
163
165
Get the total number of videos in the system
164
166
165
- > curl -H "Host: prod.immedia-semi.com" -H "TOKEN_AUTH: * authtoken from login* " --compressed https://prod.immedia-semi.com/api/v2/videos/count
167
+ > curl -H "Host: prod.immedia-semi.com" -H "TOKEN_AUTH: * authtoken from login* " --compressed https://rest. prod.immedia-semi.com/api/v2/videos/count
166
168
167
169
** Response**
168
170
JSON response containing the total video count.
169
171
170
172
** Request**
171
173
Gets a paginated set of video information
172
174
173
- > curl -H "Host: prod.immedia-semi.com" -H "TOKEN_AUTH: * authtoken from login* " --compressed https://prod.immedia-semi.com/api/v2/videos/page/0
175
+ > curl -H "Host: prod.immedia-semi.com" -H "TOKEN_AUTH: * authtoken from login* " --compressed https://rest. prod.immedia-semi.com/api/v2/videos/page/0
174
176
175
177
** Response**
176
178
JSON response containing a set of video information, including: camera name, creation time, thumbnail URI, size, length
177
179
178
180
** Request**
179
181
Gets information for a specific video by ID
180
182
181
- > curl -H "Host: prod.immedia-semi.com" -H "TOKEN_AUTH: * authtoken from login* " --compressed https://prod.immedia-semi.com/api/v2/video/*video_id *
183
+ > curl -H "Host: prod.immedia-semi.com" -H "TOKEN_AUTH: * authtoken from login* " --compressed https://rest. prod.immedia-semi.com/api/v2/video/*video_id *
182
184
183
185
** Response**
184
186
JSON response containing video information
185
187
186
188
** Request**
187
189
Gets a list of unwatched videos
188
190
189
- > curl -H "Host: prod.immedia-semi.com" -H "TOKEN_AUTH: * authtoken from login* " --compressed https://prod.immedia-semi.com/api/v2/videos/unwatched
191
+ > curl -H "Host: prod.immedia-semi.com" -H "TOKEN_AUTH: * authtoken from login* " --compressed https://rest. prod.immedia-semi.com/api/v2/videos/unwatched
190
192
191
193
** Response**
192
194
JSON response containing unwatched video information
193
195
194
196
** Request**
195
197
Deletes a video
196
198
197
- > curl -H "Host: prod.immedia-semi.com" -H "TOKEN_AUTH: * authtoken from login* " --data-binary --compressed https://prod.immedia-semi.com/api/v2/video/*video_id*/delete
199
+ > curl -H "Host: prod.immedia-semi.com" -H "TOKEN_AUTH: * authtoken from login* " --data-binary --compressed https://rest. prod.immedia-semi.com/api/v2/video/*video_id*/delete
198
200
199
201
** Response**
200
202
Unknown - not tested
201
203
202
204
** Request**
203
205
Deletes all videos
204
206
205
- > curl -H "Host: prod.immedia-semi.com" -H "TOKEN_AUTH: * authtoken from login* " --data-binary --compressed https://prod.immedia-semi.com/api/v2/videos/deleteall
207
+ > curl -H "Host: prod.immedia-semi.com" -H "TOKEN_AUTH: * authtoken from login* " --data-binary --compressed https://rest. prod.immedia-semi.com/api/v2/videos/deleteall
206
208
207
209
** Response**
208
210
Unknown - not tested
@@ -212,39 +214,39 @@ Unknown - not tested
212
214
** Request**
213
215
Gets a list of cameras
214
216
215
- > curl -H "Host: prod.immedia-semi.com" -H "TOKEN_AUTH: * authtoken from login* " --compressed https://prod.immedia-semi.com/network/*network_id*/cameras
217
+ > curl -H "Host: prod.immedia-semi.com" -H "TOKEN_AUTH: * authtoken from login* " --compressed https://rest. prod.immedia-semi.com/network/*network_id*/cameras
216
218
217
219
** Response**
218
220
JSON response containing camera information
219
221
220
222
** Request**
221
223
Gets information for one camera
222
224
223
- > curl -H "Host: prod.immedia-semi.com" -H "TOKEN_AUTH: * authtoken from login* " --compressed https://prod.immedia-semi.com/network/*network_id*/camera/*camera_id *
225
+ > curl -H "Host: prod.immedia-semi.com" -H "TOKEN_AUTH: * authtoken from login* " --compressed https://rest. prod.immedia-semi.com/network/*network_id*/camera/*camera_id *
224
226
225
227
** Response**
226
228
JSON response containing camera information
227
229
228
230
** Request**
229
231
Gets camera sensor information
230
232
231
- > curl -H "Host: prod.immedia-semi.com" -H "TOKEN_AUTH: * authtoken from login* " --compressed https://prod.immedia-semi.com/network/*network_id*/camera/*camera_id*/signals
233
+ > curl -H "Host: prod.immedia-semi.com" -H "TOKEN_AUTH: * authtoken from login* " --compressed https://rest. prod.immedia-semi.com/network/*network_id*/camera/*camera_id*/signals
232
234
233
235
** Response**
234
236
JSON response containing camera sensor information, such as wifi strength, temperature, and battery level
235
237
236
238
** Request**
237
239
Enables motion detection for one camera
238
240
239
- > curl -H "Host: prod.immedia-semi.com" -H "TOKEN_AUTH: $auth_token" --data-binary --compressed https://prod.immedia-semi.com/network/*network_id*/camera/*camera_id*/enable
241
+ > curl -H "Host: prod.immedia-semi.com" -H "TOKEN_AUTH: $auth_token" --data-binary --compressed https://rest. prod.immedia-semi.com/network/*network_id*/camera/*camera_id*/enable
240
242
241
243
** Response**
242
244
JSON response containing camera information
243
245
244
246
** Request**
245
247
Disables motion detection for one camera
246
248
247
- > curl -H "Host: prod.immedia-semi.com" -H "TOKEN_AUTH: $auth_token" --data-binary --compressed https://prod.immedia-semi.com/network/*network_id*/camera/*camera_id*/disable
249
+ > curl -H "Host: prod.immedia-semi.com" -H "TOKEN_AUTH: $auth_token" --data-binary --compressed https://rest. prod.immedia-semi.com/network/*network_id*/camera/*camera_id*/disable
248
250
249
251
** Response**
250
252
JSON response containing camera information
@@ -257,31 +259,31 @@ JSON response containing camera information
257
259
** Request**
258
260
Gets information about devices that have connected to the blink service
259
261
260
- > curl -H "Host: prod.immedia-semi.com" -H "TOKEN_AUTH: * authtoken from login* " --compressed https://prod.immedia-semi.com/account/clients
262
+ > curl -H "Host: prod.immedia-semi.com" -H "TOKEN_AUTH: * authtoken from login* " --compressed https://rest. prod.immedia-semi.com/account/clients
261
263
262
264
** Response**
263
265
JSON response containing client information, including: type, name, connection time, user ID
264
266
265
267
** Request**
266
268
Gets information about supported regions
267
269
268
- > curl -H "Host: prod.immedia-semi.com" -H "TOKEN_AUTH: * authtoken from login* " --compressed https://prod.immedia-semi.com/regions
270
+ > curl -H "Host: prod.immedia-semi.com" -H "TOKEN_AUTH: * authtoken from login* " --compressed https://rest. prod.immedia-semi.com/regions
269
271
270
272
** Response**
271
273
JSON response containing region information
272
274
273
275
** Request**
274
276
Gets information about system health
275
277
276
- > curl -H "Host: prod.immedia-semi.com" -H "TOKEN_AUTH: * authtoken from login* " --compressed https://prod.immedia-semi.com/health
278
+ > curl -H "Host: prod.immedia-semi.com" -H "TOKEN_AUTH: * authtoken from login* " --compressed https://rest. prod.immedia-semi.com/health
277
279
278
280
** Response**
279
281
"all ports tested are open"
280
282
281
283
** Request**
282
284
Gets information about programs
283
285
284
- > curl -H "Host: prod.immedia-semi.com" -H "TOKEN_AUTH: * authtoken from login* " --compressed https://prod.immedia-semi.com/api/v1/networks/*network_id*/programs
286
+ > curl -H "Host: prod.immedia-semi.com" -H "TOKEN_AUTH: * authtoken from login* " --compressed https://rest. prod.immedia-semi.com/api/v1/networks/*network_id*/programs
285
287
286
288
** Response**
287
289
Unknown.
0 commit comments