question

debugguru avatar image
debugguru asked

EndpointId in Alarms API

I am looking to use Alarms API to set custom named Alarms on Alexa from mobile app https://developer.amazon.com/en-US/docs/alexa/alexa-voice-service/avs-rest-alarms.html


I am following the example to create the alarm. However when I post following request, I am getting error back

{
    "endpointId": "@self",
    "trigger": {
        "scheduledTime": "2018-02-25T07:30:00"
    },
    "assets":[
        {
            "type": "TONE",
            "assetId": "123ABC"
        }
    ]
 }


{
    "errors": [
        {
            "code": "INVALID_ENDPOINT_ID_FORMAT",
            "description": "Device type and/or DSN cannot be found for endpoint @self"
        }
    ]
}


I have a device connected to the account and it is ON. What I am missing here?


Thanks

alexa voice servicealexa smart home
10 |5000

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

1 Answer

Jason@Amazon avatar image
Jason@Amazon answered

Please reach out over on the AVS SDK GitHub repository with a new issue for any AVS SDK related questions:

https://github.com/alexa/avs-device-sdk/issues

2 comments
10 |5000

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

Thanks jason@amazon but this issue is not related to SDK. It is related to Alarms API. You can see the response from AVS SDK team here https://github.com/alexa/avs-device-sdk/issues/1832

0 Likes 0 ·

Apologies for that - the error you are seeing is specific to an invalid endpoint ID. In the GitHub post, you mentioned that you used ask util generate-lwa-tokens to create the LWA token, but I'm not sure if you have the correct scopes when doing so.

As per the documentation, LWA when used with AVS requires the alexa:all scope. Make sure you have the scope and aren't just using the ASK CLI for the LWA token, which is generally only for skills and not AVS.

Check out the following documentation regarding LWA for AVS for details and maybe look into using details here to receive tokens specifically for AVS: https://developer.amazon.com/en-US/docs/alexa/alexa-voice-service/authorize-on-product.html

0 Likes 0 ·