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.

How to Fix Bing CAPI 401 Unauthorized Errors in Segment

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:

  1. 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.
  2. 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.
  3. Review Permissions:

    • Ensure your Bing Ads account has permission to generate and manage API keys for CAPI.
  4. Update Segment Configuration:

    • Go to the Bing CAPI destination in Segment Console and review the authentication section.
    • Refresh or re-enter your API credentials.
  5. Test the Integration:

    • Send a test event from Segment to Bing CAPI and check for successful delivery.
  6. 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:

 

Have more questions? Submit a request
Powered by Zendesk