Skip to content

Instantly share code, notes, and snippets.

@TimoDJatomika
Created March 28, 2018 13:03
Show Gist options
  • Save TimoDJatomika/0ca49795d97dfcc5b2b13a1bb67b4202 to your computer and use it in GitHub Desktop.
Save TimoDJatomika/0ca49795d97dfcc5b2b13a1bb67b4202 to your computer and use it in GitHub Desktop.
Function that takes an alexa request an in input and redirects the request to a custom api endpoint.
import requests
import json
def lambda_handler(event, context):
url = "https://api.example.com/alexa.php"
r = requests.post(url, data=json.dumps(event))
return r.json()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment