question

Greg Crawford avatar image
Greg Crawford asked

user id?

According to the App Interface Reference, a userId should be provided with each request: "User - An object that describes the user making the request to the app. A user is composed of: - userId – A string that represents the unique identifier for the user interacting with the Alexa app. Type: string." Yet, for me, the user object is empty (has no fields). Am I mis-reading the App Interface Reference? Is anyone else experiencing this?
alexa skills kitdebugging
10 |5000

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

Anil avatar image
Anil answered
Are you sure, if you look at the sample requests provided they match what I get with my apps: Something like: [i] "user": { "userId": "amzn1.account.AM4B227HF3FAM1B261HK7FFM3A2" } [/i] At one point I had some code that couldn't find the user id, but I was looking for userid in the hash, instead of userId ;)
10 |5000

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

Greg Crawford avatar image
Greg Crawford answered
This is what the raw request data from my Echo looks like (I have masked parts of the identifiers with xxxxxxxxx): {"version":"1.0","session":{"new":true,"sessionId":"amzn1.echo-api.session.xxxxxxxxxx-69ac-41dd-a1a8-xxxxxxxxxxxx","application":{"applicationId":"amzn1.echo-sdk-ams.appxxxxxxxx-5853-40bb-bbf4-xxxxxxxxxxx"},"user":{}},"request":{"type":"LaunchRequest","requestId":"amzn1.echo-api.request.xxxxxxxx-0a89-459e-92c8-xxxxxxxxxxxx"}} The "user" field is empty. And this is consistent, so far, I have never seen any data in the "user" field. Odd,
10 |5000

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

Jim Hunter avatar image
Jim Hunter answered
I get the same thing, the user is empty for me. I thought it was just because the app has not been published, it is still in development. But having the user ID would be nice in development as there are 2 of us with 2 Echo devices doing the testing. I guess in my case it wouldn't matter since we are both on the same account it would generate the same ID. But still, it would be nice to know that I am getting all the information I am supposed to get. Thanks, Jim
10 |5000

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

James Chivers avatar image
James Chivers answered
Yeah, that is odd. I can confirm that I'm definitely seeing the User ID in all my app responses. Sounds like an issue with the Alexa backend / your application :( Here's some unlikely fixes you could try: I'd double check that you completed all the application config fields in the app entry under: https://developer.amazon.com/edw/home.html#/ ...just in case there's some weird state that it won't send you the User ID data unless your app is properly configured. Maybe try creating a fresh new application?
10 |5000

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

Jim Hunter avatar image
Jim Hunter answered
I was missing some of the account info, but I have filled it in and even applied a logo, but I still am not getting user #. Thanks, Jim
10 |5000

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

Stefan Negritoiu avatar image
Stefan Negritoiu answered
Are you signed in on the device with the same developer account you registered your Alexa app with?
10 |5000

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

Jim Hunter avatar image
Jim Hunter answered
Yes, I only have one developer account and the app can only be used from my developer account (it's not a public app at this time), so that is the only way I can use it. Will things change once I publish an app? Will I then see the user ID info? I would hate to go through all the trouble of creating the app and not be able to distinguish users. Thanks, Jim
10 |5000

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

Matt Kruse avatar image
Matt Kruse answered
If you could share the details of your app, someone else here could add it to their developer portal and use it, to see if you see the user id coming in. Also, you could hit their app through your echo, to see if it's your account in particular that has an issue. I could throw together a simple app that echos the userid to a card, and give you the details to enter into your developer console to test.
10 |5000

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

Jim Hunter avatar image
Jim Hunter answered
We just got our business account hooked up and I copied the app into that account and I do get a user ID from that account, but I still do not get one from my account (they are both hitting the same API backend). So it looks like it's my account. I wonder if my account does not send the info to other apps? Is there a way to test that? Thanks, Jim
10 |5000

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

Matt Kruse avatar image
Matt Kruse answered
Is it tied to your Amazon privacy settings or something? I know that on Facebook, for example, you can opt out of the Graph API for your account. If you do this, then anyone querying their server for data will never see you or your content. Maybe there is something similar for Amazon accounts, and you opted out of something at some point. I don't know, just trying to add some info. :)
10 |5000

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