1

I am developing an app in react native, where user need to read/write data to google spread sheet. I am seeing alot of tutorial which was used for javascript/nodejs application, which I cannot apply in my project as it is not compatible with React Native. As I was studying API's, I've found that, if I use https://developers.google.com/sheets/api/reference/rest/v4/spreadsheets.values/get and https://developers.google.com/sheets/api/reference/rest/v4/spreadsheets.values/update those endpoint I will able to read/write data. But In those endpoint I need pass ACCESS_TOKEN on header where I am having the problem (My sheet is private). I don't know how to get this Access Token. Nor I am seeing any proper documentation/tutorial of this. I don't want use any third party packages, I would like to use fetch() API. Is it possible to get the access token with this? If it is, can anyone instruct me how should I do this?

Note: (I don't want to show popup box where user need to select the gmail account. I fully want this to be handled by code)

Alauddin Ahmed
  • 1,128
  • 2
  • 14
  • 34
  • Although I'm not sure whether I could correctly understand your situation, for example, how about using the service account? When the service account is used, the access token can be retrieved without authorization from the browser. If this was not the direction you expect, I apologize. – Tanaike Dec 05 '21 at 23:40
  • @Tanaike I also studied about that, I found none except node package 'googleapis' which doesn't support on React Native – Alauddin Ahmed Dec 06 '21 at 04:56
  • Thank you for replying. I apologize my comment was not useful. – Tanaike Dec 06 '21 at 05:48

0 Answers0