0

I'm using spreadsheet-api-v4 in my android app to read data from google spreadsheet. In the example here: https://developers.google.com/sheets/api/quickstart/android , they use account authentication. Is there anyway to create some anonymous/global account and skip the account registration? (something similar to anonymous account in firebase) Thanks.

dan
  • 1
  • 1
  • 1

1 Answers1

0

I don't think it's possible with Spreadsheet. As you've seen in the documentation, every request your application sends to the Google Sheets API needs to identify your application to Google.

When your application requests private data, the request must be authorized by an authenticated user who has access to that data.

When your application requests public data, the request doesn't need to be authorized, but does need to be accompanied by an identifier, such as an API key.

However, you may refer with this SO thread when you want to request for public data. It stated that the application must provide either the API key or an OAuth 2.0 token, or both.

  • If the request requires authorization (such as a request for an individual's private data), then the application must provide an OAuth 2.0 token with the request. The application may also provide the API key, but it doesn't have to.
  • If the request doesn't require authorization (such as a request for public data), then the application must provide either the API key or an OAuth 2.0 token, or both—whatever option is most convenient for you.

If you think this is a missing functionality, you can file a feature request.

Missing Features

If there is functionality missing from the Sheets API that you would like to see added, you can file a feature request on our Issue Tracker. Please describe the specific functionality you would like to see added, as well as reasons you think it's important. If possible, include specific details about your use case and the new opportunities the feature would allow for.

Hope this helps!

Community
  • 1
  • 1
abielita
  • 12,126
  • 2
  • 15
  • 52
  • Thanks!! Is there any full code example for reading data using API key in android app (for public data)? – dan Feb 11 '17 at 16:58