Alexa skill to getting data from flask rest api with ngrok

I am having an issue with an alexa skill not getting data from an Flask REST API i wrote. I followed this amazon article to get data from my API but it doesn’t seem to work.

Python Flask API code:

import time import atexit import scraper  from flask import Flask, request, render_template from flask_restful import Resource, Api from json import dumps, load from flask_jsonpify import jsonify from apscheduler.schedulers.background import BackgroundScheduler from datetime import datetime  app = Flask(__name__) api = Api(app)  scheduler = BackgroundScheduler() scheduler.add_job(scraper.main, trigger="interval", seconds=300) scheduler.start()  def toDatetime(dateStr):     dateList = dateStr.split(".")     return datetime(int(dateList[2]), int(dateList[1]), int(dateList[0]))  @app.route("/") def index():     return render_template("index.html")  class ocjene(Resource):     def get(self):         with open('data.json') as json_file:               data = load(json_file)             d = data["ocjene"]             return d  class ispiti(Resource):     def get(self):         with open('data.json') as json_file:             data = load(json_file)             d = data["ispiti"]             return d  class prosjek(Resource):     def get(self, predmet):          data = {}         with open('data.json') as json_file:               data = load(json_file)["ocjene"]          return data[predmet]  api.add_resource(ocjene, "/ocjene") api.add_resource(ispiti, "/ispiti") api.add_resource(prosjek, "/<string:predmet>")  if __name__ == '__main__': 

Alexa skill NodeJS code (important parts are getGrades and httpsGET):

// This sample demonstrates handling intents from an Alexa skill using the Alexa Skills Kit SDK (v2). // Please visit for additional examples on implementing slots, dialog management, // session persistence, api calls, and more. const Alexa = require('ask-sdk-core');  var https = require('https');  const LaunchRequestHandler = {     canHandle(handlerInput) {         return handlerInput.requestEnvelope.request.type === 'LaunchRequest';     },     handle(handlerInput) {         const speechText = "Welcome, tell me a subject and I'll tell your average";         return handlerInput.responseBuilder             .speak(speechText)             .reprompt(speechText)             .getResponse();     } }; const HelloWorldIntentHandler = {     canHandle(handlerInput) {         return handlerInput.requestEnvelope.request.type === 'IntentRequest'             && === 'HelloWorldIntent';     },     handle(handlerInput) {         const speechText = 'Hello World!';         return handlerInput.responseBuilder             .speak(speechText)             //.reprompt('add a reprompt if you want to keep the session open for the user to respond')             .getResponse();     } }; const getGradesIntentHandler = {     canHandle(handlerInput) {         return handlerInput.requestEnvelope.request.type === 'IntentRequest'             && === 'getGrades';     },     async handle(handlerInput) {         var subject = handlerInput.requestEnvelope.request.intent.slots.sub.value;         var average = await httpGet(subject);          var speechText = "Your " + subject + " average is " + average;          return handlerInput.responseBuilder             .speak(speechText)             //.reprompt('add a reprompt if you want to keep the session open for the user to respond')             .getResponse();     } }; const HelpIntentHandler = {     canHandle(handlerInput) {         return handlerInput.requestEnvelope.request.type === 'IntentRequest'             && === 'AMAZON.HelpIntent';     },     handle(handlerInput) {         const speechText = 'You can say hello to me! How can I help?';          return handlerInput.responseBuilder             .speak(speechText)             .reprompt(speechText)             .getResponse();     } }; const CancelAndStopIntentHandler = {     canHandle(handlerInput) {         return handlerInput.requestEnvelope.request.type === 'IntentRequest'             && ( === 'AMAZON.CancelIntent'                 || === 'AMAZON.StopIntent');     },     handle(handlerInput) {         const speechText = 'Goodbye!';         return handlerInput.responseBuilder             .speak(speechText)             .getResponse();     } }; const SessionEndedRequestHandler = {     canHandle(handlerInput) {         return handlerInput.requestEnvelope.request.type === 'SessionEndedRequest';     },     handle(handlerInput) {         // Any cleanup logic goes here.         return handlerInput.responseBuilder.getResponse();     } };  // The intent reflector is used for interaction model testing and debugging. // It will simply repeat the intent the user said. You can create custom handlers // for your intents by defining them above, then also adding them to the request // handler chain below. const IntentReflectorHandler = {     canHandle(handlerInput) {         return handlerInput.requestEnvelope.request.type === 'IntentRequest';     },     handle(handlerInput) {         const intentName =;         const speechText = `You just triggered $  {intentName}`;          return handlerInput.responseBuilder             .speak(speechText)             //.reprompt('add a reprompt if you want to keep the session open for the user to respond')             .getResponse();     } };  // Generic error handling to capture any syntax or routing errors. If you receive an error // stating the request handler chain is not found, you have not implemented a handler for // the intent being invoked or included it in the skill builder below. const ErrorHandler = {     canHandle() {         return true;     },     handle(handlerInput, error) {         console.log(`~~~~ Error handled: $  {error.message}`);         const speechText = `Sorry, I couldn't understand what you said. Please try again.`;          return handlerInput.responseBuilder             .speak(speechText)             .reprompt(speechText)             .getResponse();     } };  // This handler acts as the entry point for your skill, routing all request and response // payloads to the handlers above. Make sure any new handlers or interceptors you've // defined are included below. The order matters - they're processed top to bottom. exports.handler = Alexa.SkillBuilders.custom()     .addRequestHandlers(         LaunchRequestHandler,         HelloWorldIntentHandler,         getGradesIntentHandler,         HelpIntentHandler,         CancelAndStopIntentHandler,         SessionEndedRequestHandler,         IntentReflectorHandler) // make sure IntentReflectorHandler is last so it doesn't override your custom intent handlers     .addErrorHandlers(         ErrorHandler)     .lambda();  function httpGet(subject) {   return new Promise(((resolve, reject) => {     /*     var options = {         host: '',         port: 443,         path: '/jokes/' + random,         method: 'GET',     };     */      var options = {         host: '',         port: 443,         path: '/' + subject,         method: 'GET',     };      const request = https.request(options, (response) => {       response.setEncoding('utf8');       let returnData = '';        response.on('data', (chunk) => {         returnData += chunk;       });        response.on('end', () => {         resolve(JSON.parse(returnData));       });        response.on('error', (error) => {         reject(error);       });     });     request.end();   })); } 

I am using the tunneling service ngrok and it works fine otherwise (tested with Postman).

Build Backlink From DA 94 Alexa – 2 DoFollow Backlinks for $20

Do you want to grab do follow backlink from a site which has Domain Authority of 94 ? Yes In this service I will do 2 do follow backlink from Alexa which has domain authority of 94. Why getting backlink from Alexa is important? Alexa has Domain Authority of 94 and it has page rank of 7. So you can imagine how powerful & useful which will surely provide high values to your website. Here I am going to help you get 2 do follow backlinks of your desired anchor text. If you are trying to rank for any particular keywords, then you should add your keywords in anchor text and link back to your website. Website Metrics: • Domain Authority (DA): 94 • Page Authority (PA): 96 • Trust Flow (TF): 59 • Citation Flow (CF): 69 Feature of the link. ✓ Relevant ✓ High authority ✓ Do follow Link with Desired anchor text ✓ Permanent ✓ Google Animals updates SAFE, So Buy My service Now!!! PS:::If there is any query, feel free to contact me before placing order.

by: socialmedia7day
Created: —
Category: Link Building
Viewed: 170

Has it been proven, that Google Home & Alexa do not record before their respective key phrases?

The way Alexa & Google Home should work, is that they listen for a specific trigger word, after which they start sending data to their servers.

However, there have been some court cases, in which Alexa recordings have been used as evidence.

Since the smart speaker only starts sending data, once the trigger word is detected, can or has it been tested, with something like wireshark?

Would the absence of traffic be proof, that the smart speakers are not sending everything to the cloud, if not triggered by the key phrase?

Or would there be some sneaky way, in which the data can be collected all the time, but only send to the cloud after the key phrase, in order to obfuscate the spying?

If for example law enforcement had a warrant for a wiretap, and they somehow forced Google to record everything, how would they actually implement it, without a savvy user finding out?

I am really tempted to get one of these things, but I can’t stomach the bad feeling, that I am basically installing an eavesdropping device voluntarily in my home, which at some point could come back to hurt me (for example by a major data leak at Google or Amazon).

My concern is probably misplaced, since I use an android phone and an android TV, both of which could be listening to me all the time anyway, but still.

How thoroughly have these devices been tested for this by independent security analysts and what steps could I take to decrease the chance of blanked recording?

I was thinking of somehow monitoring its traffic and having a sound play, each time it sends more than X amount of data or something like that.

Top Alexa Ranking 40 Forum profile Back Link for $2

Forum profile back link is the most largest site to spread the world wide and top of the google ranking. Digital Marketing environment forum profile back link is the best online marketplace to huge traffic. Forum profile familiarity comes very nearest in marketplace. Which cause customer and buyer easily communicate their problem and swiftly motivate to enhance their business development. We can do this: 1) Higher Authority Alexa Ranking Website. 2) We accepted many keyword. 3) High DA forum profile back link. 4) White Hat service 5) All are permanent and organic link. 6) 24/7 support always. 7) Ending moment You will get report in just time. Extra Service : Great offer below for limited time

by: seogenious
Created: —
Category: Link Building
Viewed: 180

2000 USA TARGETED Human traffic to your web or blog site. Get Adsense safe and get Good Alexa rank for $1

2000 UNITED STATES OF AMERICA TARGETED REAL Human traffic in your web or website. Get Adsense safe and acquire Good Alexa get ranking REAL and SPECIAL Adsense safe Website visitors: Ever cheap value on seoclerks You’ll get 2000+ REAL and also UNIQUE visitors coming from USA TARGETED that is tracked by Yahoo analytics visitors quickly. That getting an individual natural visitors. [ We are providing always 10-15% free traffic just for your comfort ] That is an amazing package……. ★★ You are certain to get Adsense safe genuine and human targeted traffic Reminder: ✔ Usually do not use any quick url (either goo. gl or perhaps bit. ly) ✔ Targeted traffic service not regarding youtube url, ✔ Usually do not provide any reroute url ✔ Usually do not provide any primary download url ✔ Usually do not provide any primary registration form Check Our Profile Some other Gigs! ★ I am going to provide you Goo. gl analytic record with live screenshot + stay traffic tracking link. You can track all on your own [If you have any query please feel free to sent me message]

by: backlinkseo12
Created: —
Category: Traffic
Viewed: 262

Amazon Alexa house with Google Pixel 3

I have the Amazon alexa echo and dots throughout the home and have it set to turn on lights, run the roomba, ecobee 4, etc.

I recently got the Google Pixel 3 and while you can use the amazon alexa app to click to use the voice assistant, I was wondering if possible I could use the google assistant on the pixel 3 to control the same devices the Amazon alexa does, while still being able to use the alexa.

Alexa Skill: Asking the user to choose from a set of search results

I am building an Alexa skill with one intent and 3 slots. The slots are AMAZON.Date and two custom slots. The type for each of the custom slots are defined in the voice model and do not change.

The skill itself is hosted on an Elastic Beanstalk environment, and processes requests from the device using the ask-sdk for Node.js. here:

Once the Alexa has received valid values for each slot, the IntentRequest is sent to the server, and I query the database for some search results that fulfill the request.

This is my question: how do I correctly send the results of the search back to the device, for one to be selected by the user?

For example: say I am searching for ice cream shops in my local area. I provide a zip code, type of ice cream I want, etc. The ice cream shops are stored in my database. I want to return the list of ice cream shops that satisfy the search parameters, and I want the user to choose a shop from that list to “favorite”. In my API, I may want to notify the shop that someone has “favorited” their shop via an Alexa.

Thank you!

Connect with 1000 Bloggers DA20+ Alexa below 2 mln


GetReviewed is a brand new platform connecting marketers with authority bloggers with min DA20 and Alexa below 2 mln, which can publish genuine reviews of your products or blog posts with your link.

All blogs are self-hosted only, have social media followers, owned by Real Bloggers!

Prices start at 40$ /post

You get 7 Days of Free Trial if you Subscribe

In order to buy blog reviews, you need to subscribe and get access to our marketplace of blogs at just…

Connect with 1000 Bloggers DA20+ Alexa below 2 mln

What would be required to monitor Amazon Alexa traffic?

I had this interaction with a friend’s robot today:

“Alexa, are you spying on me?”

“I only send audio data back to Amazon when I hear you say the wake word.”

If I wanted to ensure that Amazon is indeed only exfiltrating recordings from the network /after/ saying the wake word, what would be required to do that? I’m imagining something like having the router block the Alexa outbound traffic unless an additional device, say a raspberry pi, also detected the wake word and opened the gate. (I imagine Alexa polls periodically just to make sure it’s connected and would complain.)

You’re welcome to provide a packet inspection/forensic solution, but I’m curious about third party work-arounds that actually forcefully prohibit communication.

I further understand there is another security issue, that Alexa could very well only send audio data back to Amazon when she hears the wake word, but /could be recording all speech all the time/, and just sends it back to Amazon in bursts when woken up and perfectly compliant with what she told me, and I don’t think there’s a way around that.