How to set credentials in new Amazon Alexa.com Rank API in Php?

好久不见. 提交于 2019-12-10 11:58:06

问题


I am working on new Alexa.com Api and testing it out and I having a problem setting credentials in it. I have an access key and secret key but not Session Token and Expiration.Idk where to get them. Also see this

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

and I could not find its root to set credentials.

I have an access key and secret key for my Alexa API calls. And I have setup up AWS SDK for PHP 3

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

How do I set credentials?

Here is the urlinfo.php code:

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


回答1:


You have a problem in your php version or your account is not verified.



来源:https://stackoverflow.com/questions/56782949/how-to-set-credentials-in-new-amazon-alexa-com-rank-api-in-php

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!