erikwihlborg76 / unofficial-danalock-web-api

9 stars 2 forks source link

None HA user. #2

Closed dezral closed 3 years ago

dezral commented 3 years ago

Could you give me an example in like postman og curl?

erikwihlborg76 commented 3 years ago

Hi @dezral - First you have to implement support for OAuth2, then a requst may look like this in concept to trigger a locking of your Danalock

Set message headers: content-type = "application/json" Accept "application/json" Authorization = "Bearer -your access token-"

Set HTTP operation & URL method = "POST"; url = "https://bridge.danalockservices.com/bridge/v1/execute";

Finally, set message payload: payload = {"device": ,"operation":"afi.lock.operate","arguments":["lock"]};

I the near future I plan to upload a node-red implementation where you could see how to create calls towards the Danalock APIs

vandenbrakel commented 3 years ago

Did you get it to work in Postman? Trying to test it. As IFTTT support is still lacking. Also starting to use Postman for the first time, so just getting into it.

erikwihlborg76 commented 3 years ago

Postman is defintently worth learning! However, I have no plans to provide a postman collection of the calls required to make use of the API. I've done major changes to the node-red implementation of the Danalock APIs that I personally use, and may share it if it works out good.

erikwihlborg76 commented 3 years ago

Closing