Skip to content

Commit 01dd4b3

Browse files
committed
Fix curl command for account-scope APIs using wrong token
Resolve account console credentials instead of workspace token when generating curl commands for Account API endpoints. Co-authored-by: Isaac
1 parent 4395a3b commit 01dd4b3

2 files changed

Lines changed: 6 additions & 2 deletions

File tree

app.py

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3187,7 +3187,11 @@ def update_curl_display(last_req, conn_config):
31873187
from urllib.parse import urlencode
31883188
if not last_req:
31893189
return "", {"display": "none"}
3190-
host, token = _resolve_conn(conn_config)
3190+
ws_host, ws_token = _resolve_conn(conn_config)
3191+
if last_req.get("is_account") and ws_host:
3192+
host, token = resolve_account_connection(conn_config, _accounts_host(ws_host))
3193+
else:
3194+
host, token = ws_host, ws_token
31913195
method = last_req.get("method", "GET")
31923196
base_url = last_req.get("url", "")
31933197
query_params = last_req.get("query_params") or {}

version.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
581
1+
583

0 commit comments

Comments
 (0)