title: Alexa - Accessing External API via Lambda
body: <p>I am making an Alexa skill and need it to query an API, however it just simply doesnt seem to work and i have tried 1 million different ways. Would be great if someone could take a look at the code below and add a basic API query, thanks!</p>
  
  <pre><code>const playersOnlineHandler = {
      canHandle(handlerInput) {
          const request = handlerInput.requestEnvelope.request;
          return (request.type === 'IntentRequest'
          &amp;&amp; request.intent.name === 'playersOnlineIntent');
      },
      handle(handlerInput) {
          const data =https.get("URL");
          const x = "Hello";
          const speechOutput = "There is currently" + data + "players online";
          return handlerInput.responseBuilder
          .speak(speechOutput)
          .getResponse();
      },
  };
  </code></pre>