These docs are for v1.0. Click to read the latest docs for v3.0.

Configuring client credentials

Setup your client credentials for use with the Agent and Python client

Creating a Pennsieve API key and secret

To create an API key/secret pair, log in to Pennsieve and navigate to your profile settings. You can do this by clicking the circular icon with your initials in the bottom-left corner of the site to navigate to your View My Profile page.

In the profile page click on the *Create API Key button and provide an meaningful name to this specific key/secret pair. For example, you can call it: "My Macbook Pro Key".

935

Set a name for your new API Key/Secret

After that you’ll see a dialog with your new API key/secret pair.

933

Copy your key/secret

📘

Important note

Make sure to save your new API key/secret pair before exiting the dialog! For security purposes, you will not be able to view the key/secret again. You can always generate a new API key/secret in case you no longer have access to your old one.

Creating a Pennsieve configuration file

The first step is to configure the agent to use your Pennsieve account by registering an API key/secret. Use the Pennsieve web application to generate API credentials

The agent configuration is built based on a config file stored in ~/.pennsieve/config.ini.

Navigate to the folder where the Pennsieve Agent is installed. Look here for the default locations for each operating system. Now, use the config wizard command to create a new config file. Provide a name for your new profile and the API key and secret that you created in the web application.

pennsieve config wizard

New profiles can be added to your configuration file using the profile create command.

pennsieve profile create
Create a new profile:
  Profile name: [default]  myProfile
  API token: xxxx
  API secret: xxxx

If the newly selected profile is not selected as the active profile, use the profile switch command to switch the active profile to the newly created profile. To verify you can access your account, use the whoami command to request some information about your Pennsieve account.

pennsieve whoami
+-----------------+-----------------------------------------------------+
| NAME            | [email protected]                                      |
| USER ID         | N:user:xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx         |
| ORGANIZATION    | User Oganization                                    |
| ORGANIZATION ID | N:organization:xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx |
+-----------------+-----------------------------------------------------+

Using environment variable overrides

Pennsieve credentials can also be configured using the following environment variables.

PENNSIEVE_API_TOKEN
PENNSIEVE_API_SECRET

As long as both of these environment variables are set, the agent will use these credentials instead of any profiles found in the config.ini file.


What’s Next