如何在新的Amazon Alexa.com在PHP中设置凭据



我正在使用new Alexa.com API并进行测试,并且在其中有问题设置凭据。我有一个访问密钥和秘密密钥,但没有会话令牌和到期。另请参阅此

$awsCredentials = $result->get('Credentials'); 

我找不到它的根源来设置凭据。

我有一个Alexa API调用的访问密钥和秘密键。我已经为PHP 3设置了AWS SDK

protected function SetCredentials($awsCredentials) {
      $this->accessKeyId = $awsCredentials["AccessKeyId"];
      $this->secretAccessKey = $awsCredentials["SecretKey"];
      $this->sessionToken = $awsCredentials["SessionToken"];
      $this->expiration = $awsCredentials["Expiration"];
    }

如何设置凭据?

这是urlinfo.php代码:

https://github.com/aws-samples/alexa-web-information-service-service-api-samples/blob/master/master/php/urlinfo.php

您在PHP版本中有问题或未经验证。

最新更新