Using 2-legged OAuth with Google Tasks API in Java - java

I’m trying to build a Sync application for Google Task API using Java.
An additional constraint I have is to use 2-legged OAuth.
I followed the article Using 2-legged OAuth with Google Tasks API for Google Apps domain administrators but the code sample they provided for Java doesn’t compile with the latest API libraries.
Also, there is lot of material available about Google Tasks, but either its deprecated or using non existent API/references.
It would be great help if someone could point me to a relevant article or working example.
Articles and sites I referred to:
https://developers.google.com/google-apps/tasks/
Thanks

Can you explain the constraint to use 2LO? There are ways to write sync apps that use OAuth2 and tokens, which has more current library and sample support. You can request "offline" access and save the refresh token in the client. Then you can continually sync that data for the user in question. Is the reason you need 2LO that you need to do this for an entire domain of users without prompting them?
In any case, the tasks api and 2LO should be compatible even if you're having issues with some libraries. I can't comment on the state of all the samples and libraries, but if you follow the steps to approve the tasks api scope for your client_id in ManageOAuthClients and you know the ids of your domain users, and you sign your requests properly, it should 'just work'

Related

Does Google provide a supported Java API client for cloud Compute service?

When looking for Google a Cloud Compute Java client there are mainly two official projects.
The first one, Google API Java client reports that's in maintenance mode.
It suggests to use a second one, GoogleCloudPlatform/google-cloud-java. But when checking the Compute subproject, it says:
Note: This client is no longer receiving updates; new features in the Compute API will not be added to this client. Check https://cloud.google.com/compute/docs/api/libraries for the recommended Java client library to use for accessing Compute.
And the link provided list some third parties libraries and the first client in this post.
Do I must conclude that Google does not provide any supported Java client for cloud Compute service?
Google API Java client is supported and very robust. Though we aren't adding new features per se we want to get bug reports and PRs and get the client library in the best shape possible. Because all the derived services are autogenerated, other libraries are going to be more idiomatic especially for newer APIs.
The best place for questions are here with the google-api-java-client tag or the mailing list https://groups.google.com/forum/#!forum/google-api-java-client . As the Github repo's issue count comes down I will be spending more of my time answering questions here on SO.

How to use Oracle Responsys with Java Application

In my Java Application I want to use Oracle Responsys to trigger individual email in response to some activity detected by my web site
Oracle Responsys is completely new for me and not able find out where to start.
I got SOAP API Developer’s Guide — Standard documentation, and trying to figure out myself. But seems to be I am not understanding the core concept of how to integrate Oracle Responsys in my application.
Please help on how to integrate Oracle Responsys into my web application? I am not able to find any Java SDK for Oracle Responsys, is there one available? If available from where I can get it?
I am not understanding the core concept of how to integrate Oracle Responsys in my application.
The "core concept" is that your application sends requests to the Responsys server's API over HTTP / HTTPS. Your application can (in theory) do this directly by crafting HTTP requests with the correct parameters / payloads / etc, and then parsing the results. Alternatively, it can use either a generic framework (such as JAX-WS), or a specific client library to do most of the tedious stuff for you.
I am not able to find any Java SDK for Oracle Responsys, is there one available.
Responsys provides both REST and SOAP based APIs, but at this time they don't appear to provide any (official) Java client-side libraries for either API.
I did find some 3rd-party client libraries on Github. Rather than listing them, I suggest that you Google for responsys api github and start trawling the search results.
Questions that ask for recommendations on StackOverflow, are off topic, so I'm assuming that you are not asking for one. But, you will need to do your own assessment of the completeness and fitness for purpose of the various library alternatives.

How do I integrate google OAuth with java servlets?

I have already created a web project (not in google app engine) and at last wanted to integrate Googe OAuth with my existing web project.Will I be needing Google Engine Plugin for Eclipse or can it be done using just google-appengine and google-sdk jars?I have gone through many links, many of them suggest about creating a maven project which destroys my project structure.
No you technically do not need any of the google jars because OAuth is a protocol, not a program of sorts. Google jars may however simplify your application.
If you want to write it from scratch, please refer to google's website about it. This website also provides clients which, and I quote from the given link:
Note: Given the security implications of getting the implementation
correct, we strongly encourage you to use OAuth 2.0 libraries when
interacting with Google's OAuth 2.0 endpoints. It is a best practice
to use well-debugged code provided by others, and it will help you
protect yourself and your users. For more information, see Client
libraries.

Is there a decent Java client for the Tumblr API?

I googled a bit, but all java clients for the tumblr API were outdated, poorly written, not supported, etc.
Is there something that is up-to-date, is of sufficient quality, and (optionally) has a maven dependency? Something like twitter4j, but for tumblr.
If you're willing to also use Spring Social, I've written a Tumblr client for it here:
https://github.com/sdouglass/spring-social-tumblr
Spring Social is a great, solid library for building and using OAuth 1/2 API clients. Using it gives you the ability to just drop in support for a variety of other APIs very easily.
http://www.springsource.org/spring-social
I've included info for adding spring-social-tumbler as a Maven dependency in the README for the project, which you can see at first the link above.
I think if you want to use it, the simplest approach would be something like:
Tumblr tumblr = new TumblrTemplate(yourTumblrApiKey);
If you want to access the API on behalf of a user, you'd need to use OAuth to get an access token and access token secret for the user, at which point you could do something like:
Tumblr tumblr = new TumblrTemplate(yourTumblrAppConsumerKey, yourTumblrAppSecret, userAccessToken, userAccessTokenSecret);
If you integrate Spring Social into your project it can help with building appropriately authorized Tumblr instances, obtaining and storing access tokens/secrets for users, etc. You'll have to check their docs for more info about that. My code is designed to "plug in" to a typical Spring Social setup the same way as the official libraries like Spring Social Facebook, Spring Social Twitter, etc.
Jumblr is the official Java API for Tumblr, here is a link! And here is the documentation
You may also have a look at Temboo. Temboo offers streamlined and normalized access to many APIs, including Tumblr, via a native Java SDK.
My personal favorite reasons for using this library is how easy it makes OAuth and that Temboo lets me save API credentials in the cloud so I don't have to go through the hoops of abstracting them from my code or securing it on my machines.
You can check it out and play with it at http://temboo.com/library/Library/Tumblr
I should also note that I work at Temboo. So when you check it out, if you have any questions, feel free to message me.
You may have a look at Webshell.
They provide a simple REST API that can be used to call third party APIs. Among those apis, there is the tumblr API.
Don't forget to check out their hilarious blog : http://apijoy.tumblr.com/ :)
You can look at Jumblr library. It is very easy and powerful.

Programmatically create Google Apps Domain

I am currently working on a project that involves the google apps provisioning api.
Without getting too detailed about the purpose or inner workings of the project, I would like to ask a very simple question:
Is there a way to programmatically create a google apps for business domain (especially as a reseller)?
After tooling around the provisioning api for a while all i could find are ways to add and remove users but nothing pertaining to whole domains.
There is an API only available to Google Apps Resellers, if you are one of them you should get access to it.
I don't know if what you're trying to do is possible, but there are lots of APIs for Google Apps stuff. This may be of some use:
The Provisioning API provides a
mechanism to programmatically create
and manage Google Apps user accounts
with one or more domains, nicknames,
email aliases,organization units, and
groups. Using this API you can
minimize disruption to your
organization's current processes by
synchronizing user data between Google
Apps and your existing user management
system.
More info here:
http://code.google.com/googleapps/docs/#domain

Categories

Resources