Reputation: 627
I want to use the new version of Google Drive Api, because the old one is going to be deprecated in March 2023. However, I don't know how to use the Google Drive Api without the gapi library for downloading and exporting files.
I have been able to login and get my access_token, but then I'm stuck about how to proceed. I've checked their website, but there aren't any solution. The only solution they bring with javascript is the obsolete one.
Here is my code to login
newLogin(){
this.pageInfo.client = google.accounts.oauth2.initTokenClient({
client_id: 'myid',
scope: 'https://www.googleapis.com/auth/drive',
callback: (response) => {
console.log(response);
},
});
this.pageInfo.client.requestAccessToken();
}
My question is about how could I proceed with Angular on download/exporting a document? If I use the gapi library, it tells me that gapi doesen't exist (Because I have not load it due the deprectation)
Thanks
Upvotes: 1
Views: 394