Я пытаюсь повторить пример с загрузкой сообщений по объекту:
https://sdk.wialon.com/wiki/en/local/re … s/messages
Запрос возвращает ошибку №7 - "Access denied". (https://sdk.wialon.com/wiki/en/local/re … ors/errors)
Объект доступен из аккаунта пользователя, т.е. пользователь имеет к нему доступ.
Запрос аутентификации:
* About to connect() to hst-api.wialon.com port 80 (#0)
* Trying 193.193.165.195... * connected
* Connected to hst-api.wialon.com (193.193.165.195) port 80 (#0)
> GET /wialon/ajax.html?svc=token%2Flogin¶ms=%7B%22token%22%3A%22438fd60e67cc8093168d21340b46acfe1C4785C28A462D8BEF2BEEC980289529895F2C72%22%7D HTTP/1.1
Host: hst-api.wialon.com
Accept: */*
< HTTP/1.1 200 OK
< Date: Fri, 29 Sep 2017 11:44:18 GMT
< Content-Type: application/json
< Content-Length: 4057
< Connection: keep-alive
< Cache-Control: no-cache
< Server: adf_http_server/4.3.0204
<
* Connection #0 to host hst-api.wialon.com left intact
* Closing connection #0
# "eid" : 066d7d3000223ef03f8579485031ae4d
Запрос "messages/load_interval" через GET:
* About to connect() to hst-api.wialon.com port 80 (#0)
* Trying 193.193.165.195... * connected
* Connected to hst-api.wialon.com (193.193.165.195) port 80 (#0)
> GET /wialon/ajax.html?svc=messages%2Fload_interval&sid=066d7d3000223ef03f8579485031ae4d¶ms=%7B%22itemId%22%3A868324022162593%2C%22timeFrom%22%3A1504213200%2C%22timeTo%22%3A1504472340%2C%22flags%22%3A1%2C%22flagsMask%22%3A65281%2C%22loadCount%22%3A3%7D HTTP/1.1
Host: hst-api.wialon.com
Accept: */*
< HTTP/1.1 200 OK
< Date: Fri, 29 Sep 2017 11:45:48 GMT
< Content-Type: application/json
< Content-Length: 12
< Connection: keep-alive
< Cache-Control: no-cache
< Server: adf_http_server/4.3.0204
<
* Connection #0 to host hst-api.wialon.com left intact
* Closing connection #0
# status code: 200
# response {"error":7}
Запрос "messages/load_interval" через POST:
* About to connect() to hst-api.wialon.com port 80 (#0)
* Trying 193.193.165.195... * connected
* Connected to hst-api.wialon.com (193.193.165.195) port 80 (#0)
> POST /wialon/ajax.html?svc=messages%2Fload_interval&sid=066d7d3000223ef03f8579485031ae4d HTTP/1.1
Host: hst-api.wialon.com
Accept: */*
Content-Type: application/x-www-form-urlencoded; charset=UTF-8
Content-Length: 167
< HTTP/1.1 200 OK
< Date: Fri, 29 Sep 2017 11:45:05 GMT
< Content-Type: application/json
< Content-Length: 12
< Connection: keep-alive
< Cache-Control: no-cache
< Server: adf_http_server/4.3.0204
<
* Connection #0 to host hst-api.wialon.com left intact
* Closing connection #0
# status code: 200
# response {"error":7}