There's a new version of the HubSpot API

As of November 30, 2022, HubSpot API keys are no longer a supported authentication method for accessing HubSpot APIs. Instead, you should use a private app access token or OAuth to authenticate API calls. Learn more about this change and how to migrate an API key integration to use a private app instead.

List SMTP API Tokens

Last updated May 15, 2023

GET /email/public/v1/smtpapi/tokens

Method Details

HTTP Methods:

GET

Response Format:

JSON

Requires Authentication?

Yes

Rate Limited?

Yes

Required Scope

transactional-email

List SMTP API tokens which can then be used to send email through HubSpot's SMTP API. Tokens listed here were created using the Create SMTP API Tokens endpoint.
Note that this API will not return passwords. Passwords are only returned during token creation, and during password reset (at which point a new password is generated).

Note that use of API requires the Transactional Email add-on.

Required Parameters How to use Description
OAuth Access Token Authorization: Bearer {token}
Used in the request headers

Used to authenticate the request. Please see this page for more details about authentication.

Example

Example URL:  https://api.hubapi.com/email/public/v1/smtpapi/tokens

Example JSON Response

[
    {
      "portalId": 62515,
      "userName": "hrfdvt58el@62515.smtp.hubspot.net",
      "emailCampaignId": 14845842,
      "createdAt": 1415660606232,
      "deleted": false,
      "createdBy": "maxiak@hubspot.com",
      "appId": 22709,
      "campaignName": "TransactionalTest"
    },
    {
      "portalId": 62515,
      "userName": "jjtww8xdue@62515.smtp.hubspot.net",
      "emailCampaignId": 14845848,
      "createdAt": 1415660619230,
      "deleted": false,
      "createdBy": "maxiak@hubspot.com",
      "appId": 22709,
      "campaignName": "TransactionalTest12"
    }
]
The emailCampaignId and appId fields above can be used in the Email Events API.