I have a requirement where I want images to be stored/retrieved from a single Google Account (this account has picasa storage). This should be done even if the user who is logged in to my web app, is different from the single google account (which has picasa storage).
(I plan to store all images used by this web app in Picasa Storage).
I couldnt find any example/reference for this particular scenario-- the docs talk about regular oauth authentication, where the user who is using the web app, gives permission to the web app to access his picasa images... What I want is, the single stored user (who has the images stored in his picasa account) is authenticated by the web app, even if a different user is logged in to the web app... Now the application can display images from the authenticated user's picasa albums...Can this be implemented? And ideally by using the google data apis client library for Java?
The answer is provided in Google Documentation of the API- at http://code.google.com/apis/picasaweb/docs/2.0/developers_guide_java.html#ClientLogin
The user id and password has to be stored in the application, and irrespective of whichever user is using the application, auth into Picasa will be done for the stored user only.
This is referred to as Single-user "installed" client authentication in the docs...
Related
I have just developed a new Android app for my company.
On the home page of the app we would like to display a number of our companies latest Facebook posts.
When send the request to the API i am receiving the error
"message": "(#200) Access to this data is temporarily disabled for non-active apps or apps that have not recently accessed this data due to changes we are making to the Facebook Platform. https://developers.facebook.com/status/issues/205942813488872/"
I have looked into this extensively and understand it is due to Facebook upgrading their APIs due to the recent data breach.
Within the app i have successfully implemented the Facebook Login API and can retrieve a new access token for the user.
I have generated all the necessary hash keys for the android app and have set it all up correctly on the facebook developer console.
I can achieve the functionality i require by getting the Access token from the Facebook developers Graph API Explorer however, this is not a good implementation as it is linked to my Facebook account and also only lasts for an hour.
The Facebook API states that public pages can be accessible using any user access token.
Is there currently anyway at all to use a user access token generated from the user login to retrieve a Facebook page data.
the only data i wish to retrieve is; the message, the time created and the image.
Is this possible with the current state of the Graph API or is it just a waiting game to see what Facebook will do next in the coming weeks?
Thanks.
I have enabled Google Drive API on Google Developer Console and created a service account credential which is bundled with a service account ID and key ID. Despite that I have tried various ways to manage my own Google Drive account, I could not find a solution which fits for my aim. I need to upload, download and delete the files stored in my own Google Drive. The application that I am going to connect Google Drive is a console one which will be solely used for an academic research.
it's pretty simple. The steps to achieve this are at How do I authorise an app (web or installed) without user intervention? (canonical ?)
Be careful about how securely the refresh token is being stored and what scopes you grant to the app.
I am using Google Drive API's using JAVA for getting drive files, i want to create a background job which will fetch the google drive files
without any user interaction (eg asking for user to explicity Authorize).
In the example given below by google, after running this java program we need to explicitly hit URL in browser & click on Authorize
for full execution of the program.
https://developers.google.com/drive/v3/web/quickstart/java
Using the Service Account I am able to fetch the google drive contents without any kind of user action (eg click on allow to authorize).
I want to acheive the same flow for individual user accounts, I have the list of emailid and passowords for google accounts.
Other than service accounts, is there any method so that i connect to the authorization url in background using HTTPPost request and
fetch the file list.
I don't think there's another way of doing this aside from Service Accounts which you are currently using. You can try to use the Google Playground but this is for testing purposes only and not for production.
I'm making a project that involves an App Engine (Java) Server that creates a spreadsheet on a weekly basis. The spreadsheet will be created on behalf of an actual Google user.
How do I configure my app to be given permanent[1] access to read/write/create a Google Sheets?
Can I use the same method[1] to access my user's Google Sheets permanently?
[1]The app is currently using a permanent (until revoked) access to the Admin API. I need a similar kind of OAuth2. https://developers.google.com/admin-sdk/directory/v1/guides/delegation.
I am trying to save some reports (in csv) on google drive from google app engine. It works fine if I hit the URL directly (after it bounced to google for authorization and click thru the screen to allow the app to access google drive)
But what if I initialize the request from cronjob in google app engine. Is there a way to let the app by passes the click thru? (or have a forever valid token?)
Note: same google account for the app and drive
For your app to access a user's data using a cron job, you will first need to get a set of OAuth 2.0 access and refresh token from the user: this should have been already implemented by you through the "click thru".
Once you get those credentials, you just have to store them in the datastore and retrieve them in the cron job in order to perform your tasks.
Retrieve and Use OAuth 2.0 Credentials shows an example of how to build an authorization flow and how to store/retrieve OAuth 2.0 credentials. Your cron job will simply need to retrieve those stored credentials and use them as usual.