Dweet Integration

I have been trying to forward my data to dweet but either I can send only text or I get errors on the routing. I have been using the Advanced Webhook Builder and trying to route to dweet. My json data looks like this message = json.dumps({“bp”: pressure})
sent = hologram.sendMessage(message)
The lastest destination URL I tried is: https://dweet.io/dweet/for/PHweather0317?"bp" : <<decdata.pressure>>
and the error I get is: Variable ‘pressure’ does not exist in object

I can’t find any information anywhere that tells me what I am doing wrong so I am asking for HELP!

I changed my code to:
data = {“bp”: pressure}
sent = hologram.sendMessage(json.dumps(data))

and changed the route to: https://dweet.io/dweet/for/PHweather0317?bp= pressure

made sure the payload was json and the header was Content-Type and application/json and now I get the error:
Server sent HTTP status code 400 with body: {“code”:“InvalidContent”,“message”:“Invalid JSON: Unexpected token j”}

What happens if you do <<decdata>> in the route instead of the .pressure

Close
I ended up removing the json from the payload for POST and changing the route to <<decdata.bp>>
and that worked.
Thanks for the help

1 Like

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.