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
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
- Wait a moment and click "Test" again; the subsequent test will immediately succeed using the newly fetched token.
- 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.