In this Article
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:
Log in to DubBot using the user account created above.
Select Profile in the User Menu
Select API Key in the left menu
Select the Generate API Key button.
Use the Key
Get your API key
Key will look like
dubbot_***************************************************
Add the request header
X-API-KEY
with the DubBot API keyMake 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:
Select the Edit HTTP Headers button.
Select the +Add Header button.
Enter the Header name of X-API-KEY
Enter the Header value using the Key value you have generated.
Altair
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!