function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
Pedro PaivaPedro Paiva 

can i use google drive api in lightning component ?

Hi, i would like to know if i can use the google drive api through rest api integration using only a lightning component without a VF page.

I watched this video: https://www.youtube.com/watch?v=rPgH5bnIn7Y abd this https://www.youtube.com/watch?v=0gRS8JWKIFI abd both use a VF page for the redirect uri authorized in google api. But would i need to use the VF page or how can i put the redirect to be a record page (Accounts) because the URL change depending on the account record.

Thanks in advance, i will appreciate any help :)
Raj VakatiRaj Vakati
Use can use Lightning components and writer server side apex class to interact with the google driver API using the HTTP Callouts
Pedro PaivaPedro Paiva
Hi Raj, Thanks for your reply. 

How could i use the http callout to get the code from google, because it will need a redirect_uri param to be set in the credentials. 
Should i use a service account instead ?
Tushar sharmaTushar sharma
Hi Pedro,

There is a step by step I share here. Which you can refer.
It take care of redirect_uri as well.

https://newstechnologystuff.com/2019/01/19/upload-file-to-google-drive-using-lightning-component/