Get Started with the Eventbrite API

Let's see what’s an Eventbrite and how to set up the credentials to get the private token for Eventbrite.

Eventbrite is an online ticketing and event management application. We can use this platform to search and create events.

We can create an event using Eventbrite’s online tool as an organizer. The events can be exhibitions, musical concerts, job fairs, and others. We can add the event’s description, cover art, Google Maps location, date and time, and much more. Eventbrite charges fees for the services to the organizers if the event has paid tickets and will not charge fees if the event is free.

Eventbrite account and private token

In this lesson, we’ll create an Eventbrite account that will enable us to test Eventbrite API’s. To create an Eventbrite account, follow these steps:

  1. Go to Eventbrite’s Sign up page, enter the required email, and click the “Continue” button.

  2. Enter the required information (“Confirm email,” “First Name,” “Last Name,” and “Password”) and click the “Create account” button.

  3. Click the “Agree” option after reviewing the “Terms and conditions” of Eventbrite.

  4. Click the “Next” button after selecting your interests from different categories.

  5. Enter the location or select from the dropdown list and click “Next.”

  6. Follow the organizers that you’re interested in and click “Finish.” It will take you to the “Homepage” of Eventbrite.

  7. To retrieve the private token, open this link and click the “Get a Free API Key” button.

  8. Finally, the private token is in the text box “Your private token.”

How to set up the private token

Copy the private token from the last step of the previous section. Now, click on the “Edit” button below. Paste the private token to the PRIVATE_TOKEN field and click on the “Save” button. The PRIVATE_TOKEN we have entered will reflect in the code widget in place of {{PRIVATE_TOKEN}}.

We are going to hit the following endpoint to retrieve the account information:

https://www.eventbriteapi.com/v3/users/me/

Press the “Run” button to see the output.

Press + to interact
import requests
import json
url = 'https://www.eventbriteapi.com/v3/users/me/'
headers = {
'Authorization': 'Bearer {{PRIVATE_TOKEN}}',
'Content-Type': 'application/json'
}
response = requests.request("Get", url, headers=headers).json()
print(json.dumps(response, indent=4))