当前行为:
期望行为:
发布于 2020-11-16 14:08:03
实现这一目标的一种方法是使用SMAPI通过JavaScript访问SMAPI,并使用可用的这里文档。
为了使用SMAPI进行身份验证,需要执行以下操作:
ask util generate-lwa-tokens --client-id <Client ID> --client-confirmation <Client Secret>将LWA客户端ID和客户端秘密交换为LWA刷新令牌。const Alexa = require('ask-smapi-sdk');
// specify the refreshTokenConfig with clientId, clientSecret and refreshToken generated in the previous step
const refreshTokenConfig = {
clientId,
clientSecret,
refreshToken
}
const smapiClient = new Alexa.StandardSmapiClientBuilder()
.withRefreshTokenConfig(refreshTokenConfig)
.client();然后,您将能够通过SDK上的函数调用来访问SMAPI!
这方面的有用资源(它显示了您所要求的内容,这是自动化的技能度量检索):https://levelup.gitconnected.com/email-yourself-daily-alexa-skill-metrics-updates-using-lambda-smapi-and-ses-9c16ac97c1f8
https://stackoverflow.com/questions/48431622
复制相似问题