# Authentication and token troubleshooting

## `401`

The bearer credential is missing, malformed, expired, revoked or no longer accepted. Replace it with a current Automation Token; do not retry indefinitely.

## `403` or `404`

The credential may be valid but current server-side membership/grants do not authorize the selected Workspace/Project/App/Build. Re-check configured UUIDs and current access.

## CLI says token/config missing

Set the non-secret API/App/Environment defaults with `appbarn config` and supply the token only through `APPBARN_TOKEN`.

## Security

Do not paste tokens into issue trackers, support emails or screenshots. Include the server request ID when asking for help.

## Related

- [Automation Tokens](/reference/automation-tokens)
- [CLI errors](/cli/errors)
