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 Technical Support
said
over 7 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.
I think setting priority and sound only works for the notifications app, not for your own app
L
LaMetric Technical Support
said
over 7 years ago
Answer
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 PopularLaMetric Technical Support
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!
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
Tom Cassady
A lex
I think setting priority and sound only works for the notifications app, not for your own app
LaMetric Technical Support
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.
-
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