API keys are created and managed in the dashboard. They are used to authenticate requests from the Blocks CLI and are scoped to a specific workspace.Install the CLI:
Copy
pip install blocks-sdk
Configure an API key when initializing:
Copy
blocks init --key <api-key>
Manually configure an API key:
Copy
blocks configure --key <api-key>
Or simply blocks configure for an interactive experience.
API keys can be assigned a TTL (time-to-live), or never expire unless manually deleted. Expired keys will automatically be deleted. You can manually delete or rename an existing API key at any time, however you cannot modify an existing API key’s TTL. An API key must be valid to register or update an automation from the CLI. Once an automation is registered, API key validity does not affect an automation’s execution.