Accessing Files from a Google Drive Folder via OAuth in a Web App

Using FastAPI and React, I try accessing files in a Google Drive folder provided via link with OAuth2.0. My /folder endpoint returns 401. Is this allowed?

from fastapi import FastAPI

app_instance = FastAPI()

@app_instance.get('/folder')
def retrieve_files():
    return 'Folder files retrieved successfully'

hey, check your scopes and credentials. google drive api usually need properly set oauth keys and scopes to allow folder access, else returns 401. try debugging the oauth settings, maybe u missed something.