Closed FroggieFrog closed 1 year ago
This path was updated in the last version. See the issue and PR below
https://github.com/plneto/Synology.Api.Client/issues/3 https://github.com/plneto/Synology.Api.Client/pull/4
I tested both auth.cgi
and entry.cgi
on version DSM 7.1.1-42962 Update 3
and I was able to login.
What version of DSM do you use? Do you know more about how these paths work? There seems to be an inconsistency in the documentation between the different PDFs FileStation API Guide, DownloadStation API Guide, and Login Web API Guide
Actually there seems to be a difference between DSM 6 and 7.
A DSM 6 version required auth.cgi
and a DSM 7 version required entry.cgi
.
I fixed it by checking the available API information and changing the path if necessary. Maybe this could be implemented int his library?
var apiInfo = await _synologyClient.InfoApi().QueryAsync();
if (!string.Equals(apiInfo.AuthApi.Path, _synologyClient.ApisInfo.AuthApi.Path, StringComparison.OrdinalIgnoreCase))
{
_synologyClient.ApisInfo.AuthApi.Path = apiInfo.AuthApi.Path;
}
I've modified the code so it always uses the paths from the InfoApi response for all APIs. This should fix the problem for everyone. Let me know if it doesn't work for you.
I had to adjust the
Path
forAuthApi
. According to the official document thepath
isauth.cgi
instead ofentry.cgi
.Workaround: