简体   繁体   中英

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

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

您的php版本有问题,或者您的帐户未通过验证。

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM