Google OAuth2 redirect_uri_mismatch error in Production but Works Locally
I’m working on a project where I need to update an organization’s Google Drive token using OAuth2 authentication. My code works perfectly on my local machine, but when I deploy it to the server, I encounter an invalid error redirect_url. Here is the relevant part of my code:
Can anyone sum up a solution that really work to upload a zip file in SSH to Gdrive using Python?
My current approach is using this code:
Cannot download file from a share folder using google drive api in python
from google.oauth2 import service_account from googleapiclient.discovery import build import io from googleapiclient.http import MediaIoBaseDownload SERVICE_ACCOUNT_FILE = ‘./sec.json’ SCOPES = [‘https://www.googleapis.com/auth/drive’] credentials = service_account.Credentials.from_service_account_file( SERVICE_ACCOUNT_FILE, scopes=SCOPES) service = build(‘drive’, ‘v3′, credentials=credentials) # ID của thư mục bạn muốn tải file từ đó folder_id = ’14hPLOEFA2PPNZA2G3KpzKYc16FWZdVYS’ query = f”parents = ‘{folder_id}'” results = service.files().list(q=query).execute() print(results) items = […]
Can not create shortcut of file using google drive api
Here is sample code that i am trying to run.