Start a new topic

DEV: "request body must not be empty"

Hello,


today I got my clock and currently I am playing around with the API.

I can send a local message without creating an APP


I followed the steps from the tutorial for the Indicator App

https://lametric-documentation.readthedocs.io/en/latest/guides/first-steps/first-lametric-indicator-app.html


I replaced the token and the App ID but if I send the code from my Linux shell I get only



 

curl -X POST -H "Accept: application/json" -H "X-Access-Token: TOKEN-REMOVED-FOR-THE-FORUM" -H "Cache-Control: no-cache" -d " { \"model\": { \"frames\": [ { \"icon\":\"i555\", \"text\":\"Hello\!\"} ] } }" https://developer.lametric.com/api/v1/dev/widget/update/com.lametric.CODE-ID-REMOVED-FOR-THE-FORUM/1

 


"request body must not be empty"


Any idea ?

1 Comment

OK the -d part war wrong, the index:0 is required



-d '{ "frames": [ { "icon":"a2867", "text":"Hello", "index":0} ] }'

 now it works

Login or Signup to post a comment