GuglielmoTor commited on
Commit
a1fc15c
·
verified ·
1 Parent(s): a6d7cd1

Update apis/Bubble_API_Calls.py

Browse files
Files changed (1) hide show
  1. apis/Bubble_API_Calls.py +2 -3
apis/Bubble_API_Calls.py CHANGED
@@ -22,9 +22,8 @@ def fetch_linkedin_token_from_bubble(url_user_token_str: str) -> Optional[dict]:
22
  The token is expected in a 'Raw_text' field as a JSON string.
23
  """
24
  bubble_api_key = os.environ.get(BUBBLE_API_KEY_PRIVATE_ENV_VAR)
25
- app_name = os.environ.get(BUBBLE_APP_NAME_ENV_VAR)
26
 
27
- if not bubble_api_key or not app_name:
28
  logger.error("Bubble API environment variables (key or app name) are not set.")
29
  return None
30
 
@@ -32,7 +31,7 @@ def fetch_linkedin_token_from_bubble(url_user_token_str: str) -> Optional[dict]:
32
  logger.info(f"No valid user token provided to query Bubble: {url_user_token_str}")
33
  return None
34
 
35
- base_url = f"https://{app_name}.bubbleapps.io/version-test/api/1.1/obj/Linkedin_access"
36
  constraints = [{"key": "state", "constraint_type": "equals", "value": url_user_token_str}]
37
  params = {'constraints': json.dumps(constraints)}
38
  headers = {"Authorization": f"Bearer {bubble_api_key}"}
 
22
  The token is expected in a 'Raw_text' field as a JSON string.
23
  """
24
  bubble_api_key = os.environ.get(BUBBLE_API_KEY_PRIVATE_ENV_VAR)
 
25
 
26
+ if not bubble_api_key:
27
  logger.error("Bubble API environment variables (key or app name) are not set.")
28
  return None
29
 
 
31
  logger.info(f"No valid user token provided to query Bubble: {url_user_token_str}")
32
  return None
33
 
34
+ base_url = "https://app.ingaze.ai/version-test/api/1.1/obj/Linkedin_access"
35
  constraints = [{"key": "state", "constraint_type": "equals", "value": url_user_token_str}]
36
  params = {'constraints': json.dumps(constraints)}
37
  headers = {"Authorization": f"Bearer {bubble_api_key}"}