SUPPORT.TWILIO.COM END OF LIFE NOTICE: This site, support.twilio.com, is scheduled to go End of Life on February 27, 2024. All Twilio Support content has been migrated to help.twilio.com, where you can continue to find helpful Support articles, API docs, and Twilio blog content, and escalate your issues to our Support team. We encourage you to update your bookmarks and begin using the new site today for all your Twilio Support needs.

HubSpot 401 Expired Authentication Error in Segment

Issue

Customers using Segment’s HubSpot Cloud-Mode Actions destination may encounter the error 401 EXPIRED_AUTHENTICATION with the message: 

The OAuth token used to make this call expired X hour(s) ago.

This typically occurs when Segment attempts to send data to HubSpot using an expired access token.

 

Product

Twilio Segment

 

Environment

Segment Console

 

Cause

This issue occurs when the OAuth access token for HubSpot expires and Segment does not successfully refresh it using the stored refresh token. This can happen if the refresh token is missing, invalid, or not being used correctly by Segment’s OAuth flow.

 

Resolution

To resolve this issue, follow these steps:

  1. Go to your HubSpot Cloud-Mode Actions destination in the Segment Console.
  2. Reauthorize the HubSpot connection from the destination’s configuration page. Ensure you are logged in as a HubSpot super admin.
  3. After reauthorizing, resend a test event or trigger a regular event to confirm successful delivery.
  4. If the error persists, check that the refresh token is present and valid in the destination settings.
  5. If you continue to experience issues, collect error details (frequency, context, logs) and contact support for further investigation.

 

Additional Information 

  • OAuth access tokens expire periodically for security reasons. Segment is designed to automatically refresh tokens using the stored refresh token.
  • If you see this error repeatedly, it may indicate a problem with the refresh token or the authorization flow.
  • Keeping your HubSpot connection up to date and ensuring the correct permissions can help prevent authentication issues.

 

Have more questions? Submit a request
Powered by Zendesk