How to allow users [read / write] access to a private fusion table using their google accounts

I am using a Fusion table to store some geographic data. I want to allow users to [read / write] access to this spreadsheet using their google accounts. Can someone please let me know how to do this?

I tried to use OAUTH2.0 [Use this as reference] and use client credentials for this. But it looks like the table is being created in a user account, not an administrator account.

+3


source to share


2 answers


The first thing that should be noted: . If you want to visualize this data on a Google Map on your webpage (using FusionTablesLayer), your only option is to share your table as public. This means read access for everyone. There are no workarounds. Live with him.



For write access: You can use the Google Drive API to set permissions on your merge table. https://developers.google.com/drive/v2/reference/permissions/insert First you need to create a merge table with an admin account (I think a service account is more appropriate) and then use permissions to access those who visits your page.

0


source


I know these questions are a little out of date, but I thought I was offering an answer for further searchers.

Basically, Google Fusion can be used as a private database, accessed through a Google Apps service account associated with a Google Apps Business account.

SERVICE ACCOUNT: create an app and go to https://console.developers.google.com/project/ [ appname ]/permissions and specify the right to your app's email address (in the permissions section); to use a service account (for 2LO authentication), then click Generate New Client ID and then generate a new P12 key that you will use in your application, if you also generate a JSON key, the text in this key will contain the email mail you will need later.



GOOGLE APPS: https://admin.google.com/ [ AppDomain ]/AdminHome?fral=1 In the admin console, go to Security and select Manage API Client Access. The API client name must be taken from the JSON file generated from the previous steps; the scope must match the scope that you will use in your code when you configure the service account credential object. If you look at the Google Code playground ( https://developers.google.com/oauthplayground/ ), you can see the exact spelling and customization of all possible API areas. For merge tables currently https://www.googleapis.com/auth/fusiontables

TABLE FUSION: The merge table now needs a business admin email account as editor

Everything should now be set up to access the private merge table from code. Lots of code examples: https://developers.google.com/oauthplayground/

+3


source







All Articles