Skip to main content
Last modified: August 22, 2025
Personal access keys provide secure account authentication for the HubSpot CLI and local development tools. Each user can only have one personal access key at a time per account, and the key can be deactivated and rotated as needed. When creating a key, you can select the specific scopes assigned to the key, which will determine the types of requests you can make through the CLI.

Generating and using your key

When installing the CLI or adding an account using the hs account auth command, you’ll be prompted to provide the CLI with your personal access key to allow the CLI to make requests to your account. You can view your personal access key using any of the following methods:
  • Follow the terminal prompts when installing the HubSpot CLI or running hs account auth.
  • Use this direct link.
  • Navigate to your key manually in your HubSpot account by clicking Development in the main navigation bar, then navigating to Keys > Personal Access Key.
Screenshot showing how to navigate to the personal access key page in HubSpot
Please note: personal access keys should be kept secure and should not be shared publicly.

Managing personal access keys

After you authenticate via the CLI using the hs account auth command, your access key will be added to your global config file (~/.hscli/config.yml) for future use. You can update the value any time by running hs account auth and copy/pasting the value from your account. Below is an example ~/.hscli/config.yml global config file.
Screenshot of an example config.yml file using example token values
Prior to version 7.4.0 of the HubSpot CLI, configuration was stored within hubspot.config.yml files. With the latest version of the CLI, only one global config file (~/.hscli/config.yml) is used to manage account configuration via the hs account auth command, with overriding capability available as needed.Learn how to migrate or merge your config files.
Authenticating an account with the CLI will connect a HubSpot Local Development Tools app to the account. This first-party HubSpot app facilitates authentication for the local development tools.
Screenshot of the HubSpot Local Development Tools app installed in an account
Personal access keys can be deactivated through any of the following methods:
  • Manual deactivation from the personal access key page.
  • Uninstalling the HubSpot Local Development Tools app in your account. This will uninstall the app for your user only.
  • Removing a user from the account.