Skip to main content

Getting an API Key

Generate your own API in the DubBot app.

Updated over a week ago

Create a User Account

We recommend creating a user account that has the sole purpose of assigning the role/permissions for the API key. Assigning the key to this account keeps the key from being inactivated were it to be assigned to a person and that person leaves the company. DubBot does not price on user account so this will not impact DubBot subscription pricing.

Create the API Key

Follow these steps to create an API Key:

  1. Log in to DubBot using the user account created above.

  2. Select Profile in the User Menu

  3. Select API Key in the left menu

  4. Select the Generate API Key button.

Use the Key

  1. Get your API key

    • Key will look like dubbot_***************************************************

  2. Add the request header X-API-KEY with the DubBot API key

  3. Make requests to GraphQL

All the actions done with the API key will be attributed to the user the API key belongs to. All permissions are based on the user.

API Key request example

curl -X POST https://api.dubbot.com/graphql \ -H "Content-Type: application/json" \ -H "X-API-KEY: dubbot_***************************************************" \ -d '{"query": "{ currentUser { name } }"}'

X-API-KEY is the authentication header to use the API Key

If using something like Postman, see their documentation about custom headers.

If using a GraphQL client, like GraphiQL App or Altair, there are options to add custom headers.

GraphiQL App

In GraphiQL app a custom header can be added by following these steps:

  1. Select the Edit HTTP Headers button.

  2. Select the +Add Header button.

  3. Enter the Header name of X-API-KEY

  4. Enter the Header value using the Key value you have generated.

GraphiQL screen shot highlighting the Edit HTTP Headers Button

Screenshot of GraphiQL App with arrows pointing at the "Add Header" button, the input field under "Header name," and the input field under "Header value"

Altair

Altair screen capture showing Auth tab selected, Auth Type of API Key, Header name of X-API-KEY,  AND Header value of API Key from app

If you have questions, please reach out to our DubBot Support team via email at help@dubbot.com or via the blue chat bubble in the lower right corner of your screen. We are here to help!

Did this answer your question?