Why can't I access GAE API in the explorer, but can open them in the browser? - google-app-engine

I'm learning how to create APIs with Google App Engine.
When I try to call a certain method in the explorer, I get the response 404.
But when I open the very same URL (http://localhost:8888/_ah/api/quoteapi/v1/quotecollection) in a browser tab, it works.
Why?
How can I fix it (make it possible to call these methods work in the explorer) ?

Did you authorize the request using the toggle button on the right top of the explorer page?

Related

App not showing up in "Open with" menu in Drive UI

I'am writing an app using Google App Engine and I want to integrate it with google drive api. Specifically I want to implement the functionality that when you right click on a txt file in the drive UI, it lets me open the file using my app as described here.
I have gone through the oauth2 using decorators in python on the server side and I am able to e.g. read information from drive files from my app.
My app is also listed in Drive under settings > Managing Apps
But it still does not show up under the Open With menu.
I have also enabled the Drive Api in the developer console, and set a Open URL to a URL under my domain and Default file extension to txt
What am I missing?
Apparently I had not enabled the correct scopes in my server-side OAuth2 authorization.
Previously I had only the scope:
https://www.googleapis.com/auth/drive
However, when I enabled the following scopes
https://www.googleapis.com/auth/drive.install
https://www.googleapis.com/auth/drive.file
profile
It worked

Disable API discovery for API Explorer

I'm new to App Engine and am trying to figure out how to disable the API Explorer from showing all my APIs, which are currently public and available to anyone visiting [MYPROJECT].appspot.com/_ah/api/explorer
Supposedly Snapchat uses AppEngine, however visiting https://apis-explorer.appspot.com/apis-explorer/?base=https://feelinsonice.appspot.com/_ah/api#p/ does not reveal their APIs.
Viewing network activity for that page you'll see that requests are being made to https://feelinsonice.appspot.com/_ah/api/discovery/v1/apis but returning a 404.
How do I do the same?
When visiting the API Explorer using my project ID I see this:
Is this the culprit?
Endpoints is the 'culprit'. I'm assuming you are using endpoints since you've included that tag, and I guess snapchat doesn't use endpoints.
There is nothing you can do to change this other then stop using endpoints.

Accessing Google Calendar API from AngularJS APP

I am implementing (I am trying to implement) a 100% client side AngularJS web app which should access the google calendar API. Of course, this doesn't work because I hit the cross domain problem:
XMLHttpRequest cannot load http://... . Origin http://localhost:9000 is not allowed by Access-Control-Allow-Origin.
Is there any solution to bypass this issue, except creating a proxy? By setting some header or changing some google configuration? I don't see one ...
Great hint Philipp! The google javascript api client (see here) does the job.
But I am wondering: How does the google javascript api client bypasses the cross domain issue? Does someone know?
You need googles side to return the right headers, Access-Control-Allow-Origin, to your browser so it doesnt complain about the cross browser issue.
Make sure in the google cloud console is configured correctly to web application. Im assuming web app because the redirect though.
If its a phoneapp or not serving anything on localhost:9000 redirect endpoint there are other options. For example you could open up the oauth redirect in another window, still use localhost:9000 as the redirect. Even though you are not listening at that port you could still grab the url code or error that is set on the redirect from the parent window.
CORS is an issue that you will experience when running the app through web browsers. I suggest you download a CORS toggle extension on google chrome so you can toggle off CORS and the API will connect. Good luck!

jbossws webservice endpoint

I have developed a simple webservice implementation using top-down approach, created a war and deployed in jboss4.2.2GA, in windows environment.
I am able to see my webservice having registered end point, in http://localhost:8080/jbossws/services. But when i click on the endpoint hyperlink, I am not able to view the wsdl page.
Is it expected behaviour? Is there anyway, i can see the wsdl page on navigating through registered webservice endpoint hyperlink?
Thanks in advance
Are you seeing a blank page when you click the link? You might need to view the page source to see the actual WSDL content. I think IE will display the WSDL by default, but Firefox and Chrome will not.

Internet Explorer download notification on HTTPS

I have a Silverlight application deployed on a HTTPS server. My applications generates reports that are saved as PDF files. Whenever a user tries to download a file from my application from IE, he gets a notification under the toolbar asking him if he really wants to download the file. If you agree, then IE reloads the page, sending the user back to the login page of my application. After logging again, the user can download any file, but this is very annoying for the user. How can I resolve this problem? Thanks!
If you know who your users are (condition), you might ask them to put your website under their list of Trusted Sites, which will avoid the annoying notification bars.
You need to trigger the download in such a way that it's obviously a user-initiated action. I'm not sure if Silverlight offers a method for this.

Resources