Problem
When a user runs apify runs ls <actor-id> and the CLI cannot find the Actor (for example, because the authenticated personal token does not have access to an organization's Actor), the error message is misleading:
Error: Actor with name or ID "83d7yK8ve5dpmGIvF" was not found. Please run this command in an Actor directory, or specify the Actor ID.
The user clearly provided an Actor ID, so the suggestions "run this command in an Actor directory" and "specify the Actor ID" are confusing and unhelpful. The real cause is usually a token/permission issue (e.g., the user is authenticated with their personal token but the Actor belongs to an organization they can only access via a separate Personal token for that org).
Steps to reproduce
- Authenticate the CLI with a personal Apify API token.
- Run
apify runs ls <org-actor-id> for an Actor that belongs to an organization the user can access in the web UI, but for which they have not switched to the org's Personal token.
- Observe the error above.
Suggested improvement
When an Actor ID was clearly provided on the command line, the error should not suggest running from an Actor directory or specifying the ID again. Instead, it should acknowledge the input and hint at the likely cause, e.g.:
Error: Actor "83d7yK8ve5dpmGIvF" was not found, or your current API token does not have access to it.
If the Actor belongs to an organization, make sure you are authenticated with that organization's Personal token (see Account → Integrations in the Apify Console).
Context
- Reported in Slack by a user who had org read permissions but was authenticated with their personal token.
- Related backlog item: multi-user / organization-aware authentication in the Apify CLI (so users do not need to swap tokens to access org resources). That work is out of scope for this issue — this is purely about the error copy.
Problem
When a user runs
apify runs ls <actor-id>and the CLI cannot find the Actor (for example, because the authenticated personal token does not have access to an organization's Actor), the error message is misleading:The user clearly provided an Actor ID, so the suggestions "run this command in an Actor directory" and "specify the Actor ID" are confusing and unhelpful. The real cause is usually a token/permission issue (e.g., the user is authenticated with their personal token but the Actor belongs to an organization they can only access via a separate Personal token for that org).
Steps to reproduce
apify runs ls <org-actor-id>for an Actor that belongs to an organization the user can access in the web UI, but for which they have not switched to the org's Personal token.Suggested improvement
When an Actor ID was clearly provided on the command line, the error should not suggest running from an Actor directory or specifying the ID again. Instead, it should acknowledge the input and hint at the likely cause, e.g.:
Context