Alexa.Skill Interface

Commands to interact with your skill backend.

Methods

onMessage

onMessage(callback): Skill

Use this function to register a listener for incoming messages sent from the skill. The messages received are independent of the messages sent from the HTML application via sendMessage. The message payload can be any JS data type.

Parameters

Name Type
callback (message: any) => void

Returns

Skill


sendMessage

sendMessage(message, callback?): Skill

This function allows the HTML application to communicate with the skill that invoked it. The message payload can be any JS data type.

NOTE: This function is rate limited and calls may not always be successful. To handle the throttling error (or any other error), please supply the optional callback argument to the function. The callback always returns the status of the send and any error will be equivalent to HTTP status code. For example rate limit will be a 429 status and general error will be 500, while a success will be 200.*

Parameters

Name Type Description
message any  
callback? (response: MessageSendResponse) => void with status of send.

Returns

Skill


Was this page helpful?

Last updated: Nov 20, 2026