Using the Rest-client gem to access the Amazon Alexa API

require 'json'
require 'rest-client'

access_key = 'ACCESS_KEY'

url = "https://api.amazonalexa.com/v1/vendors"
r = RestClient.get(url, headers={'Authorization' => access_key})
h = JSON.parse r.body

#=> {"vendors"=>[{"id"=>"M13TM2....", "name"=>"James Robertson", "roles"=>["ROLE_ADMINISTRATOR"]}]}

## Resources