A collection of utilities to access and use the harpin toolkit.
Most harpin utilities require access credentials for API authentication. These are created in the harpin web application and retrieved from local environment variables.
Follow these steps in the harpin AI web application to obtain the client ID and refresh token needed to get an access token.
- Access the harpin AI web application at https://app.harpin.ai
- Log in with your username and password. If you do not have credentials, reach out to your harpin AI account manager.
- Once you are logged in, expand the "Settings" menu in the bottom left corner, and then click on the "Account settings" menu item.
- On the "Account settings" screen, click on the "API credentials" tab.
- Copy or note the “Client ID” value on this tab.
- Use the "Generate refresh token" button to obtain a refresh token. Copy the refresh token somewhere secure, as once you leave the screen it cannot be obtained again. It will need to be regenerated.
These utilities retrieve the client ID and refresh token from environment variables named HARPIN_CLIENT_ID and HARPIN_REFRESH_TOKEN. This approach allows them to be injected at runtime using a secrets manager utility. The Client ID and Refresh Token values grant privileged access to harpin APIs - make sure they are well-protected.
Open Command Prompt or PowerShell and run one of the following commands:
- Command Prompt
set HARPIN_CLIENT_ID=your_client_idset HARPIN_REFRESH_TOKEN=your_refresh_token
- PowerShell
$env:HARPIN_CLIENT_ID="your_client_id"$env:HARPIN_REFRESH_TOKEN="your_refresh_token"
Note that this will only persist for your current session. To make it permanent, set these values through System Properties > Environment Variables.
Open your terminal and run:
export HARPIN_CLIENT_ID=your_client_idexport HARPIN_REFRESH_TOKEN=your_refresh_token
To make this permanent, add these lines to your shell configuration file (~/.bashrc, ~/.zshrc, or ~/.bash_profile depending on your shell). Then restart your terminal or run source ~/.bashrc (or the appropriate file) to apply the changes.