There's a new version of the HubSpot API

As of November 30, 2022, HubSpot API Keys are being deprecated and are no longer supported. Continued use of HubSpot API Keys is a security risk to your account and data. Your API Keys could be deactivated at any time after Nov. 30th, and we recommend that you migrate to Private Apps as soon as possible so you do not lose business-critical functionality.

List SMTP API Tokens

Last updated June 17, 2020

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.
NOTE: You must use an OAuth access token to create an event. API keys are not supported.

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.