Skip to main content
The Classiq Python SDK authenticates your device with your Classiq account through an interactive, browser-based confirmation. For unattended, server-to-server contexts where no person can sign in, use the Client Credentials (M2M) flow instead.

Authenticating your device

Make sure the SDK is installed before authenticating; see the Python SDK installation guide. In Python, run:
import classiq
classiq.authenticate()
A confirmation window opens in your web browser. Confirm the authentication:
Once confirmed, you are ready to use Classiq. The credentials are cached locally and refreshed automatically, so you only need to re-authenticate if they are missing, expired, or revoked.

Re-authenticating

To replace cached credentials, for example after they expire or when switching accounts, overwrite them:
import classiq
classiq.authenticate(overwrite=True)

Troubleshooting

Overwrite the cached credentials and authenticate again, as described in Re-authenticating.
This error means your authentication credentials were denied. Overwrite them as described in Re-authenticating.
The authentication procedure on headless Linux systems stores the tokens locally in a credentials file. You must still run the authentication once, but it can be done on another system that has a browser, then the credentials file copied over.
On some Apple computers, a system pop-up may appear during authentication:
Type your device password and click Always Allow twice.
If the problem persists, ask in the community Slack.