This commit is contained in:
2026-01-27 22:06:18 -08:00
parent 6cde9ab75f
commit dc6c24ca6d
8 changed files with 338 additions and 7 deletions

View File

@@ -11,14 +11,15 @@ FV_USER_ID = os.environ.get("FILEVINE_USER_ID")
class FilevineClient:
def __init__(self, bearer_token: str = None):
self.bearer_token = bearer_token
self.base_url = "https://api.filevineapp.com/fv-app/v2"
self.bearer_token = bearer_token
self.headers = {
"Accept": "application/json",
"Authorization": f"Bearer {self.bearer_token}",
"x-fv-orgid": str(FV_ORG_ID),
"x-fv-userid": str(FV_USER_ID),
}
self.get_bearer_token()
def get_bearer_token(self) -> str:
"""Get a new bearer token using Filevine credentials"""
@@ -32,6 +33,7 @@ class FilevineClient:
}
headers = {"Accept": "application/json"}
print("data is", data)
print(data)
resp = requests.post(url, data=data, headers=headers, timeout=30)
resp.raise_for_status()