Skip to main content

Access Tokens

By default, data packages are private. When you submit a data package query, the library will try to locate a session credential on your local machine that was created when you ran dpm login.

Access Tokens are long-lived service tokens from contexts besides your local computer, such as the server powering an online application.

Create an Access Token

To create an Access Token, navigate to the Tokens page in the dpm web application.

Token screen

  1. Provide a readable name, such as "purchase-enrichment-service".
  2. Select the data package you'd like to authorize

Use an Access Token

When you've successfully created the Access Token, it will be displayed on a modal.

Token created

tip

The token will only be displayed once! Be sure to save it in a secure, accessible place or as a DPM_AUTH_TOKEN environment variable.

In the context where you'd like to submit queries, assign the token as the value of an environment variable called DPM_AUTH_TOKEN. When queries are executed from the data package, the client will retrieve the value and pass it to the dpm-agent for authorization checks.