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.

Google Ads Conversions Intermittent 401 Unauthorized Error

Issue

You encounter intermittent 401 Unauthorized errors when testing event mappings in the Google Ads Conversions destination. When testing your mappings in the Segment UI, you may be repeatedly prompted to reauthenticate with Google, but the error often disappears if you try testing again a moment later.

 

Product

Twilio Segment

 

Environment

Segment Console

 

Cause

This issue occurs because Google Ads access tokens expire every hour. When a token expires, Segment receives a 401 Unauthorized error. 

This error is actually the exact trigger Segment uses to automatically fetch a new access token and retry the event in the background. Because Segment's live Source, Event Tester, and Mapping Tester all keep their own copies of the token, they expire at different times. 

When you hit "Test" in the mapping UI and see a 401, it simply means the tester's copy of the token expired. By the time you read the error, Segment has already fetched a new token.

 

Resolution

Because Segment handles this refresh logic automatically, you never need to manually reauthenticate your destination to fix this error. To manage this prompt and verify your integration:
  1. Wait a moment and click "Test" again; the subsequent test will immediately succeed using the newly fetched token.
  2. Monitor your live connection health by navigating to the Delivery Overview to confirm if Google accepted or rejected your payload.

 

Additional Information 

  • The Google Ads console can be heavily delayed. For new conversion actions, it can take up to 48 hours for conversions to appear in their reports.
  • Relying on Segment's Delivery Overview lets you know within 5 minutes if Google accepted or rejected your payload.

 

Have more questions? Submit a request
Powered by Zendesk