Check your workspace API permissions
Before your script edits a workspace, make it print which company it would act for. Use the workspace API and a credential issued for it. Set TRADEBIRD_API_BASE_URL to your deployment’s base URL including /api/v1, and load TRADEBIRD_API_KEY from secret storage. This request only reads the current access.
curl "$TRADEBIRD_API_BASE_URL/workspace/access" -H "Authorization: Bearer $TRADEBIRD_API_KEY"Check the returned company, principal, and effective scopes. A successful access read only proves this credential can make that read. Access to a conversation also depends on current membership or grants. To connect an MCP client, use the protected workspace endpoint and a credential suitable for it. For a human consent step, keep the setup ID and check the continuation after sign-in. Workspace quickstart · Keys and grants.
Decide whether the script should continue
Read tenant_id and company_name from the response. For a scheduled report, compare the ID with the company the job is configured to serve. A familiar company name by itself is easy to mistake for a similarly named testing workspace. Check actor_kind and scopes before requesting the report’s records.
If the company is right but a particular record is inaccessible, inspect the resource grant for that credential. If the company is wrong, stop the job and select the right credential before making more calls. This catches a costly setup mistake with one read.