1

getting error 1 on logout

Topic: getting error 1 on logout

Hi,
sorry for my question, may be it is stupid , I made a lot of search but didn't find anything.
I'm new in the wialon api , working with php files downloaded.
When I'm doing logout

$wialon_api = new Wialon();
$wialon_api->login($cur_token);

[b]some action[/b]
$wialon_api->logout();

[quote]svc=core/logout&params={}[/quote]

I'm getting error  1
Array ( [error] => 1 )  which mean "server connection error "

I need some little help.

2

getting error 1 on logout

Re: getting error 1 on logout

petko.penkov hello, unfortunately, I'm not familiar with PHP, but in Wialon error code 1 means Invalid session. This error may indicate that the session was inactive for more than 5 minutes and it was expired.
Thus, with the execution you get error 1.

Here you may found some codes description -- https://sdk.wialon.com/wiki/en/sidebar/ … ors/errors

Anton Zinovyev
Technical Care Engineer (L2)
Wialon
3

getting error 1 on logout

Re: getting error 1 on logout

Hi,
thanks for the answer.
I agree with you, I found that code here https://sdk.wialon.com/wiki/en/kit/rem … ore/logout

There is no way to provide sid in the log out , from this URL.

I mean it execute svc=core/logout&params={} and there is no session ID sid.

Regards,

4

getting error 1 on logout

Re: getting error 1 on logout

petko.penkov hello, please, accept my apology for the delay. If you execute the request like this:

$wialon_api->logout();

then you don't need to pass the sid their. But if you execute HTTP request with PHP library then you need to pass SID also. For example: 'https://hst-api.wialon.com/wialon/ajax. … mp;sid=SID'
Also, please, make sure that the logout request executes only one time.

Anton Zinovyev
Technical Care Engineer (L2)
Wialon
5

getting error 1 on logout

Re: getting error 1 on logout

Hi,
thanks for the answer, that fixed my issue.
all is working.

Thanks again.