Notifications on REST API

Where are they? I can’t find any documentation on how to create a message or notification in the new REST API on my webhook SmartApp… Is it missing? :thinking:

Hi, there! Yes, it is not included in the documents yet, but you can take a look at the example in the post below, it’s a SmartApp that creates a simple notification:

Thank you!

{
  "type": "EVENT_LOGGING",
  "locationId": "<LOCATION_ID>",
  "messages": [
    {
      "en": {
        "body": "Hello world!",
        "title": "Message"
      }
    }
  ]
}

The response I get back:

{"code":"UnauthorizedError","target":null,"message":"Invalid scope","details":[]}}

What’s the required scope for Notifications? Thanks for your help.

EDIT:

I got it, I guess I’ll leave localization to another day.

{
  "type": "AUTOMATION_INFO",
  "message": "Hello World!",
  "title": "Hello",
  "locationId": <LOCATION_ID>
}

==>

{"code":2000000,"message":"SUCCESS"}

Thanks again.

1 Like

Awesome! No problem, remember to mark the post that answered your question as the Solution.
I’ll be around in case you have more questions. Thanks!

1 Like

Thanks, I am still curious about the localization capabilities of this API, since it seems to be hinted at in the SDK.

{en_us: ...},{en_uk: ...}, {default: ...}(?) ect ect seem to be valid under this, but I get an ‘Out of scope.’ Error.

1 Like

I see, let me verify more information about this configuration and I’ll you know.

1 Like

Hey, I’m back. Our engineering team has this feature under review yet, so those extra configurations aren’t available yet.
Once they make an official release, proper documentation for this function will be updated.