larsbeck / HomematicIp

This package allows to query the HomematicIp REST and WebSocket endpoint.
MIT License
7 stars 2 forks source link

Bad Request during authorization #27

Closed SaschaWeisenberger closed 4 years ago

SaschaWeisenberger commented 4 years ago

Hi, I just tried to run the console app, but I always get an error when trying to look up the host (https://github.com/larsbeck/HomematicIp/blob/master/src/HomematicIp/Services/HomematicServiceBase.cs#L48)

Here is what Fillder says what the request body looks like: image (plus id of course, I've double checked, it is correct)

Any idea what could be the problem?

larsbeck commented 4 years ago

Hi Sascha,

the clientCharacteristics look ok. What does the error message say?

SaschaWeisenberger commented 4 years ago

StatusCode and ReasonPhrase are both "Bad Request". Is there anything else I can check?

larsbeck commented 4 years ago

Here is an idea: Is there a chance that you typed your SGTIN with dashes? It needs to be typed without dashes in the config.

SaschaWeisenberger commented 4 years ago

of course with dashes -.- sorry, I will try it without dashes when I'm back home, thanks for your help! (a small comment in the config would be nice ;) )

larsbeck commented 4 years ago

Yes, agreed. I'll actually change the code to allow dashes.

SaschaWeisenberger commented 4 years ago

even better ^^ looking forward to use this api! I have great plans...