User Tokens

A User Token in DOC is a unique identifier used to authenticate a user for programmatic access via API or Extractor Studio CLI.

User Tokens are tied to the user, not the Organization.

View Tokens

You can access User Tokens by clicking the Account Settings icon in the left navigation pane.

account settings icon

account settings menu

You can copy the Token Value by clicking the Copy to clipboard icon.

account tokens copy

You also can view your Tokens by visiting the API:

Create Tokens

Documentation for the API used to create a User Token is found at this page.

There are three ways to create a User Token:

Account Tokens Widget

Open the Account Settings page described in the View Tokens section. Click the Generate Token button.

account tokens generate

The button will not be available if at least one token exists.

cURL

Use the following request in your terminal; sub out the variables accordingly.

curl -X POST "https://workbench.import.io/api/usertokens?_apikey=< API Key from https://app.import.io/dash/account/settings >" \
-H  "accept: application/json" -H  "Content-Type: application/json" \
-d "{  \"name\": \"My User Token\",  \"userId\": \"< your user id from https://workbench.import.io/users >\"}"

Swagger

  • Visit this URL.

  • Click Try it out.

  • Edit Value of the request body to appear as:

{
  "name": "My User Token",
  "userId": "<your workbench user id>" // Found at https://workbench.import.io/users
}
  • Click Execute.

  • If successful, the newly created User Token will be in the response.

Use Tokens

You can use your User Token for programmatic access via API or Extractor Studio CLI.

API

To use your User Token with the DOC API, simply include an Authorization header with the value UserToken <your user token> for every request.

API documentation available at https://workbench.import.io/api/docs.

CLI

To use your User Token with the Extractor Studio CLI, simply enter the following command then enter your User Token when prompted:

import-io config

The User Token is used when deploying and editing Sources from an Extractor library, using the import-io source:deploy: commands.