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.

Can I Create an Audience in the Segment Public API with a Profile API Token?

Question

Can I create an audience in the Segment Public API using a Profile API token? When attempting to call the createAudience endpoint with a Profile API token, the request fails with a 403 Forbidden error.

 

Product

Segment

 

Environment

Segment Console

 

Answer

No, you cannot use a Profile API token to create an audience in the Segment Public API. Profile API tokens only grant access to Profile API endpoints, whereas audience creation via the Public API requires a dedicated Public API token.

To resolve the 403 Forbidden error and create your audience, generate and authenticate with a Public API token:

  1. Log in to your Segment workspace.
  2. Navigate to Settings > Workspace Settings > User Management > Tokens
  3. Generate a new Public API token with the required permissions for your workspace.
  4. Replace the Profile API token in your request with the new Public API token.
  5. Resend your createAudience request.

 

Additional Information

For detailed instructions on generating API keys, refer to How to Create a Public API Token.

Have more questions? Submit a request
Powered by Zendesk