claudia and API-Gateway: forbidden (/latest) - node.js

I'm using Claudia to transform my node.js app into an AWS lambda function. The integration works fine and I can access the index of my serverless website at this address:
https://*******.execute-api.eu-west-2.amazonaws.com/latest
Now I have a login page and a link to go to the page. My problem is when I click on this link, the URL is:
https://*********.execute-api.eu-west-2.amazonaws.com/login
which only returns me a forbidden message because the real page is located at:
https://******.execute-api.eu-west-2.amazonaws.com/latest/login
How can I get rid of the /latest OR how can I handle it?
Thanks for your help!

Related

heroku giveing method not allowed in node js

I tried to post method in ajax request Method Not Allowed in js and give me Status Code 4
enter image description here
You are trying to access the incorrect url for your site, as stated in the log message your url is https://morning-crag-28829.herokuapp.com

Function url missing after deployment in dialogflow

I am trying to deploy an index.js file in the dialogflow. so when I finish the steps if the deployment I am supposed to receive a Project Console and a Function Url. This function url is supposed to be added to the Fulfillment url to get the chatbot running. But I receive only the Project console as can been seen in the screenshot attached.
Anyone has an idea why?

google static maps 403 error

Failed to load resource: the server responded with a status of 403 (Forbidden)
In this subdomain-site, the static map will apear without key:
http://ag16.stewede.ch/thom.html
The same html code, but another domain:
http://praxisgemeinschaftamgleis.ch/thom.html
the map is broken and gives back the above mentioned error.
Why is that so?
Thanks, Stefan
PS: The first link works fine without a key. Now I've added one to the second link. But also with a key. It won't work! What's wrong here?
You need to use API keys.
In praxisgemeinschaftamgleis.ch the request for the map gets this error response from the API:
The Google Maps API server rejected your request. This service requires an API key.
This is new, since June 22, 2016.
See also How do I check if my domain is grandfathered?

Nest Javascript Thermostat sample not working - 400 Bad Request

I've built the sample app from here: https://developer.nest.com/documentation/cloud/control/
I've created a Client configuration on the developer site with the callback url http://localhost:8080.
The app loads and brings you to the Nest login screen. After entering details it should redirect back but instead the URL https://home.nest.com/session fails with a 400 Bad Request and the response:
{"error":"invalid_request","error_description":"missing user credentials"}
Has anyone got this sample working lately? I believe it's failing in the server.js file at this line (but I'm no Node expert unfortunately):
app.get('/auth/nest', passport.authenticate('nest'));
I've replaced the firebase.js file with the version from the Nest site. Could this be a bug in a recent version of Express or the Nest Passport library?
Tried on OSX, Linux and Windows and getting the same issue.
Thanks!
The OAuth Redirect URI in your client for this example should be http://localhost:8080/auth/nest/callback and be sure that your permissions are set for Thermostat read/write.

Using OAuth dialog for facebook app do not allow to use canvas URL as redirect_uri

I am starting a Facebook app. Following the Getting Started tutorial in the Authorization section, it says I should use this URL to get permission from users:
https://www.facebook.com/dialog/oauth?client_id=YOUR_APP_ID&redirect_uri=YOUR_CANVAS_PAGE
I am replacing YOUR_CANVAS_PAGE with my canvas URL, the one I see on my app settings:
https%3A%2F%2Fapps.facebook.com%2F238620302882463%2F
But, then, if I navigate to that page, I get the following error:
An error occurred with Elecciones 2012. Please try again later.
API Error Code: 191
API Error Description: The specified URL is not owned by the application
Error Message: Invalid redirect_uri: Given URL is not allowed by the Application configuration.
If I replace YOUR_CANVAS_PAGE with:
http%3A%2F%2Fwww.example.com%2FElecciones2012
The permission dialog works fine. But then I get redirected to my website, not the app inside facebook.com
Any idea why is this happening??
I have seen other apps using a different permission dialogue:
http://www.facebook.com/connect/uiserver.php?app_id=11609831134&method=permissions.request&redirect_uri=http%3A%2F%2Fapps.facebook.com%2Fpetsociety%2F%3Fpf_ref%3Dsb%26ref%3Dts&response_type=none&display=page&perms=email%2Cpublish_actions&auth_referral=1
But it looks it is part of another set of APIs.
I got the same problem too. Looks like the problem is in "Canvas URL". You cannot use your app id in canvas URL like:
"https%3A%2F%2Fapps.facebook.com%2F238620302882463%2F"
Instead, the namespace should be used as your canvas URL. for example:
"https://apps.facebook.com/myapplication/"
You can set your app namespace in the application settings in facebook.

Resources