DEV Community

Discussion on: How-to Read & Write Google Sheets with React

Collapse
 
saifrehman99 profile image
Saif ur Rehman • Edited

Hi guys,

If you having some issues with the permission, Just go to google console and Enable the google sheets API.

Also, while using your private key, add this piece of code

process.env.PRIVATE_KEY.replace(/\n/g, '\n')

Collapse
 
narendra315 profile image
Narendra Singh

thank you 👍

Collapse
 
dinhhuyams profile image
TrinhDinhHuy

Hi, it always said that my API key is not valid. Do we need to remove the -----BEGIN PRIVATE KEY-----\n part of the API key? I guess yes?