简体   繁体   English

如何从Lambda中的Secure REST API获取数据以获取Alexa技能?

[英]How to get data from Secure REST API in lambda for Alexa skill?

I am creating a Alexa Skill that will get data from BPM tool. 我正在创建一个Alexa技能,该技能将从BPM工具获取数据。

My BPM Tool provide a secure rest api that we can invoke with basic auth like username and password. 我的BPM工具提供了一个安全的rest api,我们可以使用用户名和密码之类的基本身份验证来调用它。

How can i call this type of web api in node.js code created in lambda? 如何在Lambda中创建的node.js代码中调用这种类型的Web API?

Steps: 脚步:

1) Create Amazon API Gateway api for alexa and deploy into stage 1)为Alexa创建Amazon API Gateway API并部署到阶段

2) Write lambda to work with Alexa Skill 2)编写lambda以使用Alexa Skill

3) Call your API end poingt into your node.js 3)调用API结束节点到node.js

If you are worried about credentials, you can set those up as environment variables for your lambda . 如果您担心凭据,可以将其设置为lambda的环境变量

With that out of the way, you should be able to use any http library (like axios or needle ) to make the requests to the service. 这样一来,您应该可以使用任何http库(例如axiosneedle )向服务发出请求。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 是否有 api 可以从 Amazon Alexa Skill Store 获取有关 Alexa 技能的详细信息 - Is there and api to get details of Alexa skill from Amazon Alexa Skill Store 如何创建从HTTP / HTTPS API获取数据的Alexa技能(在AWS Lambda上使用Node.js的“Alexa Skills Kit”) - How do I create an Alexa Skill that gets data from an HTTP/HTTPS API (using “Alexa Skills Kit” for Node.js on AWS Lambda) 如何使用Lambda函数对Alexa Skill应用程序进行异步api调用? - How to make an asynchronous api call for Alexa Skill application with a Lambda function? Alexa技能,通过API-KEY使用来自外部API的数据 - Alexa skill that uses data from an external API with API-KEY 使用Lambda以Alexa技能将数据写入dynamoDB - Writing data to dynamoDB with lambda in an Alexa skill 使用Lambda nodejs从DynamoDB读取Alexa Skill - Read from DynamoDB with Lambda nodejs for Alexa Skill 使用Lambda函数从S3存储桶中检索数据以链接到node.js中的alexa技能 - Retrieve data from S3 bucket with Lambda function link to an alexa skill in node.js HTTP / HTTPS GET请求Alexa技能-“响应无效” Lambda响应 - HTTP / HTTPS GET Request Alexa Skill - “The Response is Invalid” Lambda Response Lambda函数在DynamoDB终止Alexa技能之前结束 - Lambda function ends before DynamoDB get ends in Alexa skill 运行脚本时数据不刷新(NodeJs Lambda Alexa技能) - Data Not Refreshing when running script (NodeJs Lambda Alexa Skill)
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM