If you are a developer or a company seeking to integrate your services with HubSpot, then you will require the use of HubSpot’s APIs. These APIs are authenticated using API tokens. This tutorial will walk you through the steps of acquiring your HubSpot API token.
What is a HubSpot API token?
A HubSpot API token is a unique identifier that is used to authenticate requests to HubSpot’s APIs.
It ensures that only authorized users can access the API and perform specific actions.
So, in essence, the API token is a key to accessing and manipulating your data in HubSpot programmatically.
How to get a HubSpot API token?
To get a HubSpot API token, you must first have a HubSpot account.
If you don’t have one, you can sign up for a free account here.
After logging in, follow these steps:
- Navigate to your account dropdown menu in the top right corner, then click on Settings.
- In the left sidebar menu, navigate to Integrations > API key.
- If you have not created an API key before, click on Create now.
- If you have previously created an API key and need to generate a new one, click on Generate new API key.
- After creating your API key, it will be displayed in the dialog. Make sure to copy it and store it securely.
Using the HubSpot API Token
Now that you have your API token, you can use it to authenticate your API requests.
Just include it in the Authorization header of your HTTP requests,
like this (replace YOUR_HUBSPOT_API_TOKEN with your actual token):
Authorization: Bearer YOUR_HUBSPOT_API_TOKEN
Your request headers should look something like this:
GET /endpoint HTTP/1.1 Host: api.hubapi.com Authorization: Bearer YOUR_HUBSPOT_API_TOKEN
Please note that all HubSpot API requests must be made over HTTPS.
Conclusion
That’s it! You now know how to get your HubSpot API token and how to use it for authenticating your API requests.
If you have any questions, feel free to leave a comment below.