Unable to use API token

Hello and thanks for a really nice product!

We’re unable to use API tokens. Steps to reproduce:

  1. Generate a new administrator API token.
  2. Signing in with that: 8base login --token MY_NEW_TOKEN
  3. Select default workspace and retrieve API endpoint URL: 8base configure --workspaceId MY_WORKSPACE_ID

This fails with:

error: Not valid auth token and not registered token

Are we using the API token incorrectly or is this a bug?

Hi @fornwall - great question.

The API token will not work with the configure command. Using API Tokens to authenticate the CLI is largely meant for CI/CD scripts. If you’re acting as a Developer in a local development environment, please login with your developer credentials.

Thanks a lot for your response!

I’m indeed using the CLI from CI, so I’ve switched to storing the workspace id in a .workspace.json file (that’s the best way, right?) and it now works. Thanks!

1 Like