Amazon Echo Developers Access

This should be done using the Echo control mobile app (and it’s equivalent webpage); but I guess the Echo SDK doesn’t allow any hooks into that yet, right? Can you send a “card” to the app, at least?

Regardless, each Echo is associated with a specific account (and their authorized added “household member” profiles). So Amazon has to either provide credential storage of some sort, and/or they are going to force you to use your Amazon credentials for your own services.

Something like:

I just got started on something like this, your code will save me loads of time.

1 Like

You can also combine Lambda and OAuth by using Amazon Cognito to acquire AWS creds via Facebook, Google, Login with Amazon, and other providers.

BTW, we shipped Java support for Lambda last week. The Alexa documentation examples are still all coded in nodejs, but you can also use Java or Scala to implement an Alexa skill on Lambda.The Lambda docs have Java examples and you can either work on the Alexa event as JSON or Jackson-ify it into a POJO if you prefer.

Sometimes it makes me sad when I read something like this, and understand what it means. Makes me want to become a farmer :smile:

1 Like

Need a little help with filling in the blanks for this lambda function. I see you have:

var AUTH =  "Bearer uuid"  // change to use your oauth bearer UUID
var SMARTAPP = "" // change to use your oauth endpoint

Should AUTH be set to the access token (that I get using instructions from Tutorial: Creating a REST SmartApp Endpoint)? My REST endpoint app access token is of the form: 12345678-1234-1234-123456789abc

As for the SMARTAPP variable, where would I get that from? I tried (after logging in) and it dumped a whole bunch of JSON and I did see a UUID of a similar pattern as the access token for my REST app, is that what I need to use?

Thanks in advance.

Never mind, I should have paid a bit more attention to the “Bearer uuid”, it’s a header value. So, I did get the SMARTAPP part correct. AUTH should be set to “Bearer 12345678-1234-1234-123456789abc” where the uuid portion is the same as the access_token.

So, in Step 4: Going through the Oauth Process to Interact with the Endpoint of the link you linked to about creating a rest endpoint they explain how you get the bearer uuid and endpoint given the Client ID and Client Secret - you get the bearer uuid and endpoint url after you complete the oauth with smartthings.

I wrote a little node.js app that does this and prints out the two values after doing the oauth, if you want to use that - see Updated Developer Docs!

1 Like

Got my smartthings devices all hooked up with Alexa. Thanks for all the help.