http request to netatmo fails with error (solved!)
-
Hi, can anyone help me with connection to the Netatmo API?
https://dev.netatmo.com/resources/technical/samplessdks/codesamplesI tried it with the new http request block but I get the error "invalid_request, Invalid grant_type parameter or parameter missing"
What could be the problem?
-
May sound stupid but have you tried
payload = {'grant_type': 'authorization_code',
Perhaps your code should be key "grant_type" value authorization_code
-
thx, but this seems not to be the solution (I tested it anyway). Grant-Type "password" is correct afik.
-
@dblooom The header option should be like it.
-
oh, that was wrong, thx. But still get the same error...
-
Ok, could figure it out. The http-req sends data as JSON but Netatmo needs it as "data". So I could change it in Phyton code but can't do it in blocky.
@devs: So it would be nice to have two different slots in the http-reqthing: one for json-data and one for data. Or an option to switch it.
-
@dblooom please post this as a bug report on the UIFlow github page as this is important enough for immediate attention
-
@ajb2k3 hm thx. But I'm not familiar with github. Maybe you can submit it for me?
-
@dblooom said in http request to netatmo fails with error (solved!):
@ajb2k3 hm thx. But I'm not familiar with github. Maybe you can submit it for me?
Done.