This object is in archive! 
Cant get api for login to work in c#
Need Answer
Hi
I am trying login with api from my c3 project.
First i call
- WebClient client = new WebClient();
- string url = "https://my.zipato.com:443/zipato-web/v2/user/init";
- var result = JsonConvert.DeserializeObject<init>(client.DownloadString(url));
from here i get valid response with jsessionid and nonce.
Then i make a token from it:
- var token = tools.CalculateSha1(nonce + tools.CalculateSha1(password, Encoding.Default), Encoding.Default);
pasword is my password for login and nonce i get from init api.
Ok now i have a token and then i try this:
- var url22 = "https://my.zipato.com:443/zipato-web/v2/user/login";
- string username = "username";
- WebClient client2 = new WebClient();
- string url2 = url22 + "?username=" + username + "&token=" + token.ToString();
- var result2 = JsonConvert.DeserializeObject(client.DownloadString(url2));
But i am always getting success:false, user not found or wrong password.
I read that i need to send cookie with session id but i dont know how :).
Anyone has an ideo on hot to login with c#?
No connection
Real-time notifications may not work
Hi Andrej,
Have you solved your problem? Because i'm facing the same.
-Felix
Hi Andrej,
Have you solved your problem? Because i'm facing the same.
-Felix
Either you are hashing wrong, or you are missing an argument on the authenticate call. I pass &method=SHA1 as well.
Either you are hashing wrong, or you are missing an argument on the authenticate call. I pass &method=SHA1 as well.
Thank you so much Pål, the problem was in the hashing.
Thank you so much Pål, the problem was in the hashing.
Hi guys,
I made an open source C# library which is on GitHub and NuGet. Feel free to help. https://github.com/leonmeijer/Zipato.NET
Hi guys,
I made an open source C# library which is on GitHub and NuGet. Feel free to help. https://github.com/leonmeijer/Zipato.NET
Hi!
Great job leonMeijer! Thanks you very much. I was planning a development of an application on Windows Phone. Your work is going to save me a lot of time!
Question : How get allendpoints of type Switch On/Off?
Hi!
Great job leonMeijer! Thanks you very much. I was planning a development of an application on Windows Phone. Your work is going to save me a lot of time!
Question : How get allendpoints of type Switch On/Off?
OK, we can use endpointtype to filtre actuator.onoff (or actuator.onoff.light)
OK, we can use endpointtype to filtre actuator.onoff (or actuator.onoff.light)
Hey chHome. It's also my intention to build an Universal (Win 8.1/WinPhone 8.1) or UWP (Universal Windows Platform, Windows 10) app. It will be a hobby project, but perhaps we can join our efforts.
Regarding your question, I'm working right now on extending the library with support for retrieving devices, better attribute support and I will add a method to get all on/off switches.
Hey chHome. It's also my intention to build an Universal (Win 8.1/WinPhone 8.1) or UWP (Universal Windows Platform, Windows 10) app. It will be a hobby project, but perhaps we can join our efforts.
Regarding your question, I'm working right now on extending the library with support for retrieving devices, better attribute support and I will add a method to get all on/off switches.
I checked in to Github. You can call
I didn't find endpointtype reliable enough so I'm retrieving all endpoints and all attributes and I link these two together in the object model. Then I return a list of all endpoints that have an attribute with a definition of com.zipato.cluster.OnOff. By default I exclude the Zipabox on/off commands (for example for the LEDs). And by default hidden devices are returned, unless you pass hideHidden = true which makes a call for each endpoint unfortunately.
I checked in to Github. You can call
I didn't find endpointtype reliable enough so I'm retrieving all endpoints and all attributes and I link these two together in the object model. Then I return a list of all endpoints that have an attribute with a definition of com.zipato.cluster.OnOff. By default I exclude the Zipabox on/off commands (for example for the LEDs). And by default hidden devices are returned, unless you pass hideHidden = true which makes a call for each endpoint unfortunately.
Hi,
try this one:
https://github.com/ggruner/Zipatoapi
Gruß Helle
Hi,
try this one:
https://github.com/ggruner/Zipatoapi
Gruß Helle
Replies have been locked on this page!