I tried everything from this thread verbatim, copying and pasting to make sure it's right, and I still get the response:
{ "errors" : [ { "message" : "Invalid json" } ] }
I ran the code through JSONLint and it says my code is valid, but I can't get it to work.
Any help?
Thanks.
Best Answer
L
LaMetric B2B Support Team
said
about 8 years ago
Tom, the JSON object is correct. The only thing is that the icon id should be "i849" to be displayed correctly on the device. Could you please also provide more details on the request you are trying to send to the device? We are interested in URL and headers.
Tom, the JSON object is correct. The only thing is that the icon id should be "i849" to be displayed correctly on the device. Could you please also provide more details on the request you are trying to send to the device? We are interested in URL and headers.
Tom Cassady
I tried everything from this thread verbatim, copying and pasting to make sure it's right, and I still get the response:
I ran the code through JSONLint and it says my code is valid, but I can't get it to work.
Any help?
Thanks.
Tom, the JSON object is correct. The only thing is that the icon id should be "i849" to be displayed correctly on the device. Could you please also provide more details on the request you are trying to send to the device? We are interested in URL and headers.
- Oldest First
- Popular
- Newest First
Sorted by Newest FirstA lex
I think setting priority and sound only works for the notifications app, not for your own app
Martin Berger
I have used same code like this in curl command, I get the same error:
curl -X POST \
> -H "Accept: application/json" \
> -H "X-Access-Token: <mytoken>" \
> -H "Cache-Control: no-cache" \
> -d '{
> "priority": "critical",
> "model": {
> "cycles": 1,
> "frames": [{
> "icon": "i849",
> "text": "HELLO!"
> }],
> "sound": {
> "category": "notifications",
> "id": "cat"
> }
> }
> }
> ' \
> https://developer.lametric.com/api/v1/dev/widget/update/com.lametric.c096a00f664dc51df34914839bdfa2a9/3
{"error":{"message":"Bad Request","trace":{"frames":"frames must not be empty"}}}
Regards, Martin
LaMetric B2B Support Team
Tom, the JSON object is correct. The only thing is that the icon id should be "i849" to be displayed correctly on the device. Could you please also provide more details on the request you are trying to send to the device? We are interested in URL and headers.
Tom Cassady
LaMetric B2B Support Team
Hi Tom, could you please copy and paste here JSON you are trying to send? We will check whether it works and get back to you. Thanks!
-
How to pull data from external site to display?
-
nodejs request "gets acces denied"
-
curl to python for eventghost
-
Push text from Eventghost to LaMetric via python
-
Basic API pull and json parse example....
-
A guide for starting an app?
-
A small wrapper to push your just created JIRA issues to your LaMetric.
-
Simple project to push home consumption data to be shown on a Lametric device
-
Interface to have Slack send messages to a LaMetric Time
-
Very simple module to push frames to LaMetric
See all 149 topics