aws-samples / alexa-web-information-service-api-samples Goto Github PK
View Code? Open in Web Editor NEWCode samples to make signed requests to the Alexa.com APis on AWS Marketplace
License: MIT License
Code samples to make signed requests to the Alexa.com APis on AWS Marketplace
License: MIT License
protected function SetCredentials($awsCredentials) {
$this->accessKeyId = $awsCredentials["AccessKeyId"];
$this->secretAccessKey = $awsCredentials["SecretKey"];
$this->sessionToken = $awsCredentials["SessionToken"];
$this->expiration = $awsCredentials["Expiration"];
}
I have access key and secret key but not Session Token and Expiration. Also, $awsCredentials point to $awsCredentials = $result->get('Credentials'); and I could not find its root to set credentials.
As I'm running PHP 7.2 and this is only tested to 7.1, I shouldn't complain about the myriad of warnings and errors, this one however confuses me: What is the point in having an API key if a username and password are required?
If I call the UrlInfo.php file just as the readme states, I get asked for a password, to which I hit enter and get:
Error executing "InitiateAuth" on "https://cognito-idp.us-east-1.amazonaws.com"; AWS HTTP error: Client error:
POST https://cognito-idp.us-east-1.amazonaws.com` resulted in a 400 Bad Request
response:
{"__type":"InvalidParameterException","message":"Missing required parameter PASSWORD"}
InvalidParameterException (client): Missing required parameter PASSWORD - {"__type":"InvalidParameterException","message":"Missing required parameter PASSWORD"}`
Also a note on the "works on 7.1" in the readme: while it may run, it most certainly doesn't "work". The code is still PHP5 style code. Would it take that much to update it? Is this service even used anymore?
Hi! Getting 500 backend service error.
How do you specify a date range with API?
I'm confused by the procedures required to call awis service, as demonstrated by code samples.
For example, AWIS java example shows that I need to authenticate using my username/password, get my access/secret keys, set up complicated headers (host
, x-amz-date
, x-amz-security-token
, etc.), and compute hashes, before making request to awis.
But why is this necessary? Isn't it that only a simple x-api-key
request header is required? (I tried, it worked.) What are the benefits for this complicated setup?
Sorry if the question sounds obvious/strange/whatever, because I'm not familiar with AWS in general. I'm only making request from machines in on-prem cluster, not from inside AWS.
Hi, I ran the project and got data successfully. I changed the API URL parameters but when I build and run it again, It causes this error:
The process cannot access the file alexa.credential because it is being used by another process. I closed Visual Studio solution and reopend it but nothing changed. What should I do?
Any help will be appreciated.
I try to make a query according to the documentation, I include my username and my api key and it throws the following error
BEGIN REQUEST++++++++++++++++++++++++++++++++++++
Request URL = https://awis.api.alexa.com/api?Action=urlInfo&ResponseGroup=Rank&Url=sfgate.com
Traceback (most recent call last):
File "awis.py", line 310, in
r = requests.get(request_url, headers=headers)
AttributeError: module 'botocore.vendored.requests' has no attribute 'get'
Script wasn't running- issue addressed here: boto/botocore#1829
Fixed by changing:
from botocore.vendored import requests
to:
import requests
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.