Surveillance station API: Unable to get the sid

This forum is for devlopers to discuss questions about apps/plug-ins/extension modules/API specifically developed for using with Synology DiskStations.
Forum rules
We've moved! Head over to Synology Community ( to meet up with our team and other Synology enthusiasts!
I'm New!
I'm New!
Posts: 1
Joined: Fri Aug 11, 2017 9:36 pm

Surveillance station API: Unable to get the sid

Unread post by domoos » Fri Aug 11, 2017 9:43 pm

Good evening,

First off, I do hope that I am posting this message in the correct forum. Please excuse me if not as I'm quite a newbie :)

I'm trying to use the API that Synology has kindly provided. I looked at the documentation and trying first off to login :

What I wrote so far is :

Code: Select all


$local_file = "test.txt";

$ch = curl_init();
$fp = fopen ($local_file, 'w+');
curl_setopt($ch, CURLOPT_COOKIEJAR, "/debug/SS-session_cookie");
curl_setopt($ch, CURLOPT_FILE, $fp);
curl_setopt($ch, CURLOPT_URL,"");
$resp = curl_exec ($ch); 
curl_close ($ch);

However, if I look at the generated file (test.txt), I only get the following :


Same if I copy and paste the url : {"success":true}

Any idea what I'm missing and why I don't get the sid ? (I'm sure about my user/password ;-))

Many thanks for your help and best wishes.


I'm New!
I'm New!
Posts: 5
Joined: Fri Dec 31, 2010 2:59 pm

Re: Surveillance station API: Unable to get the sid

Unread post by Zebble » Fri Sep 07, 2018 7:59 pm

Ran into the same issue. In case you haven't solved this, you need to set "version=2" (or higher, currently up to version=6) to get the sid to work.

Using your example: ... format=sid


Return to “Developer Discussion Room”