---
title: "Rotate the API token of a datasource in Dashboard Hub"
canonical: "https://support.appfire.com/space/RDD/3946774529/Rotate+the+API+token+of+a+datasource+in+Dashboard+Hub"
format: markdown
---
> Macro (aura-html)

## Overview

Many Dashboard Hub datasources store a credential (an API token, an API key, a password, or a personal access token) so that gadgets can load data from another product. This page explains how to **replace that credential** with a new one, and how to confirm that the datasource keeps working.

Use this procedure when:

- You want to rotate a credential as part of your security policy.
- A token was revoked or has expired in the source product.
- A datasource or a gadget shows an authentication error such as `TOKEN_EXPIRED` or `NOT_AUTHENTICATED`.

You will:

1. Identify the datasources that store a credential.
2. Create a new credential in the source product.
3. Update the datasource in Dashboard Hub.
4. Verify that the datasource works.
5. Revoke the old credential.

**Time needed**: About 5 minutes per datasource. 

## Before you begin

- **Permissions**: You can edit a datasource only if you created it or have **Edit **access to it. Otherwise, **Edit datasource** is greyed out. Ask the owner (see the **Owner** column in **Manage datasources**).
- **Account access**: To create a new Atlassian API token, sign in to Atlassian **as the account whose email is stored in the datasource**. Tokens belong to a user account.
- **Allowlist**:** **If your site restricts external datasources, the datasource URL must be on the allowlist.
- **Order matters**: Create the new credential → update Dashboard Hub → verify → **then** revoke the old credential. This avoids downtime.

> ℹ️ Dashboard Hub never displays a saved credential again. When you edit a datasource, the credential fields are empty on purpose. Leave a field empty to keep its current value, or type a new value to replace it.

## What changes

| What | Detail |
| --- | --- |
| **What you change** | The credential stored in the datasource: API token, API key, password, or personal access token, depending on the product. |
| **What stays the same** | The datasource itself (its name, URL, and sharing permissions), your dashboards, and your gadgets. You **edit** the datasource. You do **not** delete and re-create it, so gadgets stay linked to it. |
| **What does not need rotating** | Datasources that do not store a credential. See "Datasources that do not store a credential" below. |

> ⚠️ **Important:** Creating a new credential is not enough. You must also **revoke the old one** in the source product (step 5). Until you do, the old credential still works.

## Which datasources need rotation

A datasource needs rotation if you had to paste a secret into Dashboard Hub when you created it.

### Datasources that store a credential (rotate these)

| **Datasource** | **Tab / variant** | **Credential stored in Dashboard Hub** | **Field(s) to complete when editing** | **Where to create the new credential** |
| --- | --- | --- | --- | --- |
| Jira | Cloud API/Token | Atlassian account email + API token | *User (email)*, *API Token* | <u>[Atlassian API tokens](https://id.atlassian.com/manage-profile/security/api-tokens)</u> > **Create API token** |
| Confluence | Cloud API/Token | Atlassian account email + API token | *User (email)*, *API Token* | <u>[Atlassian API tokens](https://id.atlassian.com/manage-profile/security/api-tokens)</u> > **Create API token** |
| Jira / Confluence | Server / Datacenter | Username + password | *Username*, *Password* | Your Server/DC instance |
| Jira / Confluence | Server / Datacenter (Personal Access Token) | Personal access token (PAT) | *API Token* | Your Server/DC profile > **Personal Access Tokens** > **Create token** |
| Bitbucket | Cloud | Atlassian account email + scoped API token | *Bitbucket user email address*, *API token* | <u>[Atlassian API tokens](https://id.atlassian.com/manage-profile/security/api-tokens)</u> → **Create API token with scopes** (see "Bitbucket Cloud required scopes" below) |
| Bitbucket | Server / Datacenter | HTTP access token | *HTTP access token* | Bitbucket DC > **Manage account **>** HTTP access tokens **>** Create token** (read permission on projects and repositories) |
| **Atlassian Assets** (JSM Assets / Insight) | **Cloud** | Atlassian account email + API token | *Username*, *API token* | <u>[Atlassian API tokens](https://id.atlassian.com/manage-profile/security/api-tokens)</u> > **Create API token** |
| **Atlassian Assets** | **Server / Datacenter** | Username + password | *Username*, *Password* | Your Server/DC instance |
| Atlassian Statuspage | n/a | Organization API key | *API Token* | <u>[Statuspage manage page](https://manage.statuspage.io/)</u> > avatar > **API info** > **Organization API keys** |
| Opsgenie | n/a | API key | *API Key* | Opsgenie **Settings **>** API key management** > **Add new API key** (with *Read* and *Configuration Access*) |
| monday.com | n/a | API token | *API Token* | [http://monday.com](http://monday.com)  profile > **Developers / API token** page |
| BigPicture | Cloud | BigPicture API token | *API Token* | <u>[BigPicture API tokens](https://softwareplant.com/doc/api-tokens?product=eu.softwareplant.bigpicture)</u> |
| BigPicture OKRs | n/a | BigPicture OKRs API token (+ link to a Jira datasource) | *API Token* | <u>[BigPicture OKRs authentication](https://developer.bigpicture.one/reference/okr-authentication)</u> |
| Projectrak | n/a | API key ID + API key (+ link to a Jira datasource) | *API key ID*, *API key* | <u>[Projectrak developer docs](https://deiser-apps.atlassian.net/wiki/spaces/PROJECTRAKCLOUD/pages/1638463/Developers)</u> |
| Time to SLA | n/a | API token (+ link to a Jira datasource) | *API Token* | <u>[Time to SLA REST APIs](https://appfire.atlassian.net/wiki/spaces/TTSC/pages/36209134)</u>. The token needs the **SLA** and **Issue SLA** access. |
| Custom Reports gadget | Authorization = *API Key*, *Bearer Token*, or *Basic Auth* | API key, bearer token, or basic-auth username + password. Custom headers and query parameters can also hold secrets. | Fields on the **Authorization**, **Query Params**, and **Headers** tabs | The third-party API you call |

> 📝 **Datasources that depend on a Jira datasource.** BigPicture OKRs, Projectrak, and Time to SLA each have their **own** credential **and** are linked to a Jira Cloud datasource. If the linked Jira datasource's credential is invalid, these datasources show an authorization warning too. Update **both**.

### Datasources that do not store a credential (no rotation needed)

| Datasource | Why |
| --- | --- |
| **Jira / Confluence → Cloud (Connector)** and the default **This instance** datasource | Uses the Dashboard Hub Connector app. No API token is stored. |
| **Custom Reports** with *Authentication Type = No Auth* | Nothing is stored. Still review the **Headers** and **Query Params** tabs for secrets. |

## Step 1: Identify the datasources that store a credential

1. In Dashboard Hub, open the **More options (…)** menu in the top navigation bar.
2. Select **Manage datasources**. The *Manage Datasources* page displays.
3. (Optional) Use the **Created by me** filter and the **Product** filter to narrow the list.
4. For each row, check the following columns:
  1. **Type**: Token datasources are identified by a key icon. These store a credential. Rotate the credentials for all datasources of this type.
  2. **Product**: Refer to the table above to identify which fields to replace.
  3. **Name**: A Warning icon displays next to the name when Dashboard Hub receives authorization errors for the datasource, for example, an expired or revoked token. Prioritize these datasources.
  4. **Owner**: The name of the person who can edit the datasource. Contact the owner if you don’t have edit access.
5. Make a note of every datasource that stores a credential (name, product, owner). This is your rotation checklist.

## Step 2: Create new credentials

Create a new credential for each datasource you identified using the *Datasources that store a credential* table. When you generate a new token copy it. You will paste it the next step. In this section, we provide an example of token generation with Atlassian Cloud. Steps will differ for your other datasources.

> ℹ️ Several gadgets and dashboards can share one datasource. When you update a datasource, every gadget that uses it picks up the change, so you don’t need to reconfigure gadgets one by one.

### Atlassian Cloud API token (Jira, Confluence, Assets Cloud)

1. Go to <u>[Manage Atlassian API tokens](https://id.atlassian.com/manage-profile/security/api-tokens)</u>.
2. Select **Create API token**. If you are creating a token for Bitbucket, select **Create API token with scopes**.
3. Enter a name and select **Create**.
4. Select **Copy**. Store it in a safe place; you will need it in the next step.

## Step 3: Update the datasource in Dashboard Hub

1. Open *Manage Datasources* as in Step 1.
2. In the row of the datasource, select **Actions (⋯)** > **Edit datasource**.
3. Enter the new credential:
  - **Jira / Confluence Cloud API token**: Enter **both** *User (email)* **and** *API Token*. Dashboard Hub requires both or neither, so the **Save** button stays disabled until both are filled in.
  - **Other datasources**: Complete the field(s) listed for your datasource in the table above.
  - **Bitbucket Cloud / Assets Cloud**: Dashboard Hub validates the new credential by loading your workspaces. If your credential has access to more than one workspace, choose the correct one from the workspace list.
4. Leave other fields (name, URL, sharing) as they are, unless you also need to change them.
5. Select **Update** to save the changes.
6. For BigPicture OKRs, Projectrak, and Time to SLA, also update the linked Jira Cloud datasource.

> ℹ️ Repeat these steps for each datasource in your checklist.

## Step 4: Verify the datasource

### Check the datasource status

1. Open *Manage Datasources*.
2. Confirm the Warning** **icon is gone from every datasource you edited. Saving a datasource clears the authorization-error state.
3. For BigPicture OKRs, Projectrak, and Time to SLA, confirm the warning is also gone. It follows the linked Jira datasource.

### Check a dashboard that uses the datasource

1. Open a dashboard that has gadgets using the datasource. To confirm, open a gadget's configuration and check its **Datasource** field.
2. Reload the page.
3. Confirm the gadgets load data and show no authentication error.

## Step 5: Revoke the old credential

After you verify that the datasource works, revoke the old credential in the source product:

- **Atlassian API token**: Open <u>[API tokens](https://id.atlassian.com/manage-profile/security/api-tokens)</u> and select **Revoke** next to the old token.
- **Other products**: Delete or revoke the old key, token, or password in the product's API settings.

> ⚠️ Revoking a credential that a datasource still uses makes its gadgets stop loading data. Revoke only after you update every datasource that uses it. The same credential can be used by more than one datasource.

### Confirm the old credential is revoked

After step 5, reload the same dashboard. The gadgets should still load. This confirms nothing is  using the old credential.

## Troubleshooting

| **Message or symptom** | **What it means** | **What to do** |
| --- | --- | --- |
| `TOKEN_EXPIRED`: "The api token has expired. Please create a new one and try again" | The stored token is no longer valid (expired or revoked). | Create a new token in the source product, then follow step 3. |
| `NOT_AUTHENTICATED`: "The api token has expired. Please create a new one and try again" | The source product rejected the credential. | Same as above. If it persists, check that the email matches the token owner and that the account is active. |
| `INVALID_CREDENTIALS`: "Invalid credentials. Please try another one." (shown under the token field) | The email, username, password, or token you entered was rejected. | Copy the token again, without spaces. Check the email belongs to the account that created the token. For Jira Cloud, confirm the URL is the site root (for example `https://your-site.atlassian.net`; for Confluence add `/wiki`). |
| Warning icon next to a datasource name ("This datasource has reported some authorisation errors…") | The source product rejected the stored credential. | Update its credential (step 3). |
| Warning on BigPicture OKRs / Projectrak / Time to SLA: "The linked Jira datasource … has reported authorisation errors" | The linked Jira datasource is invalid, not this one. | Update the **Jira** datasource's credential. The warning clears on the dependent datasources. |
| **Edit datasource** is greyed out | You are not the owner and you do not have **Can edit** access. | Ask the owner, or someone with **Can edit** access, to update it. If the owner is no longer available, see the FAQ. |
| The save button is disabled in the Jira / Confluence Cloud API token form | Email and token must be filled in together. | Enter both *User (email)* and *API Token*. |
| Bitbucket: "Your API token is missing required scope(s) …" | The new token lacks scopes. | Create a new token with all required scopes. |
| Bitbucket: "App passwords are deprecated and must be replaced with an API token" | The datasource still uses an App Password. | Create a scoped API token and update the datasource. |
| `INVALID_SCOPE` / `INVALID_TOKEN` (for example Opsgenie): "The api key is not valid…" | The key lacks the required access. | Create a new key with *Read* and *Configuration Access*. |
| "Error adding datasource, there are no workspaces in that instance" (Assets, Bitbucket) | The credential has no access to a workspace. | Use an account that has access to the workspace. |
| "URL not allowed, ask the administrator to allow this URL in the 'Allowlist' configuration" (`NOT_ALLOWED_DATASOURCE`) | Your site's datasource restrictions block the datasource URL. | Ask your site administrator to add the URL to the allowlist. |
| `FORGE_TOKEN_EXPIRED`: "The Forge token has expired…" | This is a connector datasource. It does **not** use an API token. | Wait and try again. If it persists, reinstall the Dashboard Hub Connector on the affected site. |

## FAQ

**Do I have to rotate every datasource?**  
No. Only datasources that store a credential. **Cloud (Connector)** and **This instance** datasources store none.

**I get an authentication error in a gadget or a datasource. What do I do?**  
Create a new credential in the source product and update the datasource as described in step 3. See Troubleshooting for the specific messages.

**Do I need to delete and re-create datasources or dashboards?**  
No. Edit the datasource. Its sharing settings stay the same, so gadgets stay linked.

**Will gadgets stop working during the rotation?**  
Not if you follow the order: create the new credential, update Dashboard Hub, verify, and only then revoke the old credential.

**Can I see my current token in Dashboard Hub?**  
No. A saved credential is never displayed again.

**I only changed the password or token in the source product. Do I still need to edit the datasource?**  
Yes. Dashboard Hub keeps its own copy and does not know about the change until you edit the datasource.

**The datasource owner is no longer available.**  
Change the configuration of the affected gadgets so they use another datasource. Open each affected gadget, change its **Datasource** field to a datasource you can use, and save the gadget.

## Need help?

If you need help or cannot complete a step, contact Appfire support:

- **Support portal**: [https://appf.re/support](https://appf.re/support)
- **Dashboard Hub documentation**: [https://apps.appf.re/dh/doc](https://apps.appf.re/dh/doc)

Include in your request:

- Your site URL.
- The datasource name and product. Never send the token or password.
- The exact error message, for example `TOKEN_EXPIRED`.
- A screenshot of the error.