SMTP API Tokens - Password Reset

POST /email/public/v1/smtpapi/tokens/:userName/password-reset

Method Details

HTTP Methods:

POST

Response Format:

JSON

Requires Authentication?

Yes

Rate Limited?

Yes

Once you have an SMTP API, the List SMTP API Tokens endpoint can be used to list all SMTP API Tokens in the portal. However, for security reasons the password is only provided during the time of the token creation. This endpoint allows for the creation of a replacement password for a given Token, keyed by the userName field. Once the password is successfully reset, the old password for the token will be invalid.

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

Required Parameters How to use Description
Access Token Used in the request URL The HubSpot access token for the given portal
userName Used in the request URL The userName field of the SMTP API Token needing a password reset.

Example

Example URL: POST https://api.hubapi.com/email/public/v1/smtpapi/tokens/zh48wgsfld%4062515.smtp.hubspot.net/password-reset?hapikey=demo

Example JSON Response

{
  "portalId": 62515,
  "userName": "aezckvh3hx@62515.smtp.hubspot.net",
  "password": "ItUuCc8h4I5MihiysY8HB6XSbWZmVZ",
  "passwordHash": null,
  "emailCampaignId": 14860979,
  "createdAt": 1415740569008,
  "deleted": false,
  "createdBy": "demo@hubspot.com",
  "appId": 22709,
  "campaignName": "test transactional email"
}

SMTP API

After resetting the password for the token above, you can use SMTP to send an email:
  • SMTP Hostname: smtp.hubapi.com
  • SMTP Port: 587 (for STARTTLS) or 465 for TLS
  • SMTP User Name: hrfdvt58el@62515.smtp.hubspot.net
  • SMTP Password: 3432fff8eljl1249fjjasdfnv3