Overview

The proxy command allows you to interact with a local service running on your machine via an Alexa device. Using it, you can make changes to code running on your machine and immediately make them available via an Echo or the Alexa simulator.

The proxy tool works either directly with Node/JavaScript lambda code - proxy lambda. Or it can proxy any http service using proxy http.

The two commands are described below, as well as the urlgen helper command.

bst proxy lambda

Overview

The proxy lambda command allows you to run a Lambda as a local service your machine.

Note

  • The command currently only supports Node/JavaScript Lambdas.

Usage

To use it, invoke it with the Lambda file to run. The proxy will automatically use the latest code in your working directory.

Syntax:

$ bst proxy lambda <PATH_TO_LAMBDA>

Example:

$ bst proxy lambda index.js

You can learn more here at our Node.js Tutorial:

Options

The --verbose flag will print out the requests and responses from all calls made to your skill.

To use it, just start up the proxy with:

$ bst proxy lambda index.js --verbose

bst proxy http

Overview

Proxy http allows you to interact with a local service running on your machine (on a port) via an Alexa device.

Usage

The proxy http command takes one command, the that your local Alexa service is listening on. All traffic coming from Alexa will be forwarded to it.

Syntax:

$ bst proxy http <PORT>

Example:

$ bst proxy http 9999

You can learn more here at our Java Tutorial

Options

The --verbose flag will print out the requests and responses from all calls made to your skill.

To use it, just start up the proxy with:

$ bst proxy http 9999 --verbose

bst proxy urlgen

Overview

Your skill must be setup to point at our server. For example, if the URL for your skill is normally:

https://myskill.example.com/skillA

It should instead be configured to point at the bst proxy server, like so:

https://proxy.bespoken.tools/skillA?node-id=1b84270f-5b58-4176-a8b6-7b5b1c03a308

Note the Node ID passed in the query string. This is a UUID that ties off your local proxy with our server.

The rest of the URL path and query string should be unchanged.

For more information on configuring your Skill see Configuring your Skill for bst proxy.

Usage

The proxy urlgen command can help generate the endpoint.

Syntax:

$ bst proxy urlgen <URL>

Example:

$ bst proxy urlgen https://myskill.example.com/skillA

The above example command will then provide you with HTTPS endpoint that is required during the configuration step when you setup your Alexa Skill.