User Tokens

A User Token in Workbench 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.

Viewing your 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 can also view your Tokens by visiting the API:

Creating a User Token

Documentation for the API used to create a UserToken is found at this page

There are three ways to create a User Token:

Account Tokens widget

Open Account Settings page described in Viewing User Tokens section. Use 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 look like

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

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

Using your Token

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

API

To use your User Token with the Workbench 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 and 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.