I am trying to use the PredictionSample in google-api-java-client, but with ClientLogin authentication it gives me error:
User is not a trusted tester
I have activated the Google Prediction API in my APIs Console project. And I am able to run the Hello World prediction example from http://code.google.com/apis/predict/docs/hello_world.html with the same user. It uses oacurl and oauth2.
But it does not work with google-api-java-client. I am also not able to make oauth2 work with google-api-java-client.
I have searched the documentation and samples and have found no solution. Is it possible to do what is done in the hello_world example using the google-api-java-client.
I ran into a similar problem using Blogger API in my Google APP Engine Project. Attached is the link to the Stackoverflow question and sample code I was able to get working. Hope it helps.
Proper Form of API request to Blogger using Java/App Engine -error 401
Related
I would like to access my Google Drive account via their API inside of a Rails application. The idea is that I will store files, but I don't believe I need to implement any authorisation for it (like with Oauth2, for example), since I only want to access my account.
I have been researching for 2 days, but the Google documentation seems very confused and not very clear.
I started in vain with this guide https://developers.google.com/drive/api/v3/quickstart/ruby and tried to co-opt it for use inside of Rails, but since it relies on storing a token file returned upon authentication, I figured this wasn't really the right approach.
I don't have any code to share, just looking for some clarity on how I can achieve what I'm trying to do, or indeed if it's even possible.
Additional Info:
I'm using Devise for my own authentication, so implementing omniauth through that would be an option if it's necessary. I looked through some documentation around that which Devise has on their side, but I didn't want to go through that (it seemed like a lot) before knowing it was the correct course of action.
You need OAuth 2.0 to authorize requests on the Drive API as described on the documentation. In that link, you can find: «All requests to the Drive API must be authorized by an authenticated user».
To complete that authorization process, you should follow the instructions on the Drive API Ruby Quickstart linked on your question. Generating and saving a credentials.json for later use is the normal approach in this situation. Here you can read about using OAuth 2.0 over different scenarios.
I hope to have cleared your doubts on this topic, but feel free to ask further questions.
I was just trying to use cl-twitter, installed it first using quicklisp and I got this error when executing examples from its documentation:
The function TWITTER:AUTHENTICATE-USER is undefined.
Is this software up to date? Or it's just that the documentation is not? Are there any other working Common Lisp libs for Twitter API?
I cannot offer a full client library, but for the authentication part of it, cl-oauth works well. See this piece of code for a usage example.
I'm trying to create a redistributable web application that will integrate with Google Analytics through the Google Reporting API. Customer will install the application on their server.
I'm following this tutorial (I'm using PHP, but I believe this is not of importance for my question)
https://developers.google.com/analytics/resources/tutorials/hello-analytics-api
This works fine. No issues there.
However I can't figure out one missing element:
The tutorial starts with sending me to the Google APIs console where I have to create and configure a new API project and create and configure a client ID.
That's a lot of work that requires fairly technical knowledge (redirect url, selecting correct API, error-prone copy-and-pasting, etc.)
So my questions:
Is there an API so I can programmatically set this up for my user?
If that's not possible, is there a more user-friendly way to obtain Analytics reporting that is future-proof? (I noticed they are currently deprecating a few older APIs)
Unfortunately that's AFAIK not possible.
You could go one of the following ways:
Move client_id and client_secret to some configuration file and help your customer with deployment.
Show a one-time setup wizard for your app and guide your customer step-by-step. There you can at least provide him with the right callback URLs.
Regard your application as "installed application" and instrument curl or something similar for sending the requests.
does anybody work with foursquare api and asp.net, do you know some basic tutorial, how to set the environment, do I need some api, how can I make my app to conect to 4sq and ask something. I work with asp.net mvc2, and any clue on this would be helpful.
Thanks in advance.
There are a couple of C# libraries available for the foursquare API, you can see the complete list here:
https://developer.foursquare.com/docs/libraries.html
In terms of tutorials, you can use the interactive query viewer on the foursquare website to get a sense of the data:
https://developer.foursquare.com/docs/venues/venues.html
(click 'try it now' and it will give you an interactive query console for the api!)
You can also get a walkthrough of how to do OAuth2 authentication on the website too:
https://developer.foursquare.com/docs/oauth.html
For what it's worth, when I was first playing with the API I found it useful to test out all of my queries using cURL, then once you use a library you're already a pro.
Hope that helps?
I want to develop a web application that uses the Twitter API.
Where can i find examples
thanks for replay. I have downloaded an app from this site - github.com/yusuke/sign-in-with-twitter I have deployed and its running, but its giving javax.el.PropertyNotFoundException: Property 'userId' not found on type twitter4j.Twitter this exception after giving log in credentials in twitter log in site. thanks in advance.
i am not able to resolve this issue. can anybody help on this
Search for 'twitter api java examples' in Google and you'll find plenty of examples.
See http://blog.richardadamdean.com/?p=89 for an example using Twitter4J.
As a connection library, you could use
Twitter4J on http://twitter4j.org/
java-twitter on http://code.google.com/p/java-twitter/
JTwitter on http://www.winterwell.com/software/jtwitter.php
You can use Java Twitter - a pure Java interface for the Twitter API.
http://code.google.com/p/java-twitter/
Documentation and examples are on that page too :)