Using the design tokens API
  • 31 Jan 2023
  • 1 Minute to read
  • Dark
    Light

Using the design tokens API

  • Dark
    Light

Article Summary

The DSM Tokens API provides programmatic access to your tokens. It allows you to download a ZIP file that includes the entire folder tree, where each token set is available as a JSON file.

To help you get started, we created this example script that uses the the DSM Tokens API and Style Dictionary to create style files for different platforms.

Accessing the API endpoint

To access the API endpoint for tokens:

  1. Open your DSM design system and navigate to the Tokens page.
  2. Next to the Tokens heading in the left-hand navigation, click the action menu.
  3. Click API setup.
  4. Copy the API endpoint for your design system's tokens.

Generating authentication keys

Using the design tokens API requires an authentication key. To generate an authentication key, click Manage in the Manage authentication keys panel of the API setup page.

  1. Open your DSM design system and navigate to the Tokens page.
  2. Next to the Tokens heading in the left-hand navigation, click the action menu ().
  3. Click API setup.
  4. In the API Authentication section, click Manage.
  5. Click Generate new key.
  6. Copy the Key ID, add an optional Description, and click Save.

Revoking authentication keys

To revoke an existing authentication key:

  1. Open your DSM design system and navigate to the Tokens page.
  2. Next to the Tokens heading in the left-hand navigation, click the action menu ().
  3. Click API setup.
  4. In the API Authentication section, click Manage.
  5. Next to the appropriate key, click Revoke.
  6. To confirm, click Revoke again.

Was this article helpful?