API tokens
Creating temporary and permanent API Tokens
Last updated
Creating temporary and permanent API Tokens
Last updated
© DuploCloud, Inc. All rights reserved. DuploCloud trademarks used herein are registered trademarks of DuploCloud and affiliates
DuploCloud supports two kinds of API tokens: temporary and permanent. For normal use cases, we recommend using a temporary API token. A permanent API token is warranted for CI/CD or other DevOps automation.
Permanent API tokens will expire after one year.
Every time a user logs in to DuploCloud, a temporary API token is created for that user that only lasts for their session.
Any user can retrieve their temporary API token from DuploCloud. Navigate to the User -> Profile page. Click the copy icon in the Temporary API Token area.
Only administrators can create permanent API tokens. Permanent tokens are always associated with a specific Duplo user.
Note: Permanent API tokens will expire after one year.
In the DuploCloud Portal, navigate to Administrator -> Users.
Click the Username in the list. The user's page displays.
Click the Tokens tab.
Click Add. The Create a new token pane displays.
Create a meaningful Token Name and click Create—a window containing the token displays.
Click the Copy button to copy your token to the clipboard. Store it somewhere safe. You cannot retrieve it from DuploCloud.
Permanently save your token somewhere safe. You will not be able to retrieve it from DuploCloud after you have created it. However, if you lose your token, you can always create a new one.
You can configure DuploCloud system settings to generate faults and send notification emails when API tokens are nearing expiration.
From the DuploCloud portal, navigate to Administrator -> Systems Settings. Select the Config tab, and click Add.
For Config Type, select App Config; for Key, select Enable. For Token Notification, and in the Value field, enter the number of days before token expiration when faults should show.
Click Submit. DuploCloud will generate a fault when an API token is the set number of days from expiration.
From the DuploCloud portal, navigate to Administrator -> Systems Settings. Select the Config tab, and click Add.
For Config Type, select App Config; for Key, select User Token Expiration Notification Emails; and in the Value field, enter the user email addresses (separated by semicolons) to which notification emails will be sent.
Click Submit. DuploCloud will email the listed email address(es) when an API token is set to expire in a set number of days.