Authentication Overview

HubSpot's APIs allow for two means of authentication, OAuth and API keys. API keys are great for rapid prototyping, but for security and commercial use, all integrations designed to be used by multiple HubSpot customers should use OAuth - this is required for becoming a featured integration.

Unless otherwise mentioned in the documentation for a specific endpoint, all endpoints support both OAuth and API keys. Below are examples of making the same request (using cURL), with different types of authentication. Aside from the authentication used, the requests are identical and would return the same results.

In each example, the request is being made to this endpoint (documented here):

API keys are great for rapid prototyping, but for security and commercial use, all integrations should strive to use OAuth. The best way to get started is by creating a developer accounts. From this developer account you can spin up test accounts which have their ownAPI keys. You can also create an Application from the developer account to get started with OAuth.