Closed r2moon closed 6 years ago
I got 403 error while createFileMultipart. The google sign in is working, but drive api does not work.
Here is Google Signin Scrips and Drive Api call script.
await GoogleSignIn.configure({ scopes: ['https://www.googleapis.com/auth/drive', 'https://www.googleapis.com/auth/drive.appdata', 'https://www.googleapis.com/auth/drive.file', 'https://www.googleapis.com/auth/drive.metadata', ], shouldFetchBasicProfile: true, offlineAccess: true });
let res = await GDrive.files.createFileMultipart("My File Contents", "text/plain", { parents: ['root'], name: "myfile" })
Oh, I found the reason. It's because I didn't enable google drive api.
I got 403 error while createFileMultipart. The google sign in is working, but drive api does not work.
Here is Google Signin Scrips and Drive Api call script.
await GoogleSignIn.configure({ scopes: ['https://www.googleapis.com/auth/drive', 'https://www.googleapis.com/auth/drive.appdata', 'https://www.googleapis.com/auth/drive.file', 'https://www.googleapis.com/auth/drive.metadata', ], shouldFetchBasicProfile: true, offlineAccess: true });
let res = await GDrive.files.createFileMultipart("My File Contents", "text/plain", { parents: ['root'], name: "myfile" })