Why
An API key never gets this code: a key without the scope an operation needs getsworkspace_forbidden.
What to do
Ask an owner or admin of the workspace to make the change, or to give the member a role that grants it.In the SDKs
The Node and Python SDKs raisePermissionDeniedError. The Go SDK returns *apierrors.PermissionDeniedError, which you match with errors.As.