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
1) This is a user forum for Synology users to share experience/help out each other: if you need direct assistance from the Synology technical support team, please use the following form:

https://account.synology.com/support/su ... p?lang=enu



2) To avoid putting users' DiskStation at risk, please don't paste links to any patches provided by our Support team as we will systematically remove them. Our Support team will provide the correct patch for your DiskStation model.
domoos
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

<?php

$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,"http://195.168.0.60:7123/webapi/auth.cgi?api=SYNO.API.Auth&method=Login&version=1&account=XXX&passwd=YYY&session=SurveillanceStation&format=sid");
$resp = curl_exec ($ch); 
curl_close ($ch);
fclose($fp);
unset($ch);

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

{"success":true}

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.

[/color]

Post Reply

Return to “Developer Discussion Room”