question

Luca Innocenti avatar image
Luca Innocenti asked

How to get the userid?

How is possible to retrieve userid (from Skill I/O Json) in Alexa Skills using NodeJs_

Thanks

Luca

alexa skills kitalexalambdanodejs
10 |5000

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

chicken_wing avatar image
chicken_wing answered
10 |5000

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

Rokas avatar image
Rokas answered

How to get userId in sdk v1:

const userId = this.event.context.System.user.userId

sdk v2:

const userId = handlerInput.requestEnvelope.context.System.user.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.