Issue
When connecting Segment to Microsoft Bing Conversions API, customers may see a 401 Unauthorized error. This error appears during event delivery and means Bing rejected the authentication credentials.
Product
Twilio Segment
Environment
Segment Console
Cause
The 401 Unauthorized error is caused when Bing’s API cannot verify the credentials provided by Segment. This can happen if the Bing Ads API token is expired, revoked, or missing required permissions, or if the Bing CAPI account is not properly provisioned by Microsoft.
Resolution
Follow these steps to resolve the issue:
-
Check Bing Ads API Credentials:
- Make sure the credentials entered in Segment are current and valid.
- If you recently updated your credentials, re-authenticate and save the configuration.
-
Confirm Account Provisioning:
- Bing CAPI is in pilot and requires account-level provisioning.
- Contact Microsoft Support or your Bing Account Manager to confirm your account is eligible and fully provisioned.
-
Review Permissions:
- Ensure your Bing Ads account has permission to generate and manage API keys for CAPI.
-
Update Segment Configuration:
- Go to the Bing CAPI destination in Segment Console and review the authentication section.
- Refresh or re-enter your API credentials.
-
Test the Integration:
- Send a test event from Segment to Bing CAPI and check for successful delivery.
-
Check for Microsoft Restrictions:
- If the error persists, verify with Microsoft if there are any restrictions or changes affecting API access.
Additional Information
If you continue to see 401 errors after these steps, gather error logs and payload samples and share them with Segment or Microsoft Support for further troubleshooting. For more details, see: