Get Started

Welcome to Stubhub International's developer portal.

Whether you're just starting to work with APIs or you're an expert, we're here to help you create apps that connect people to amazing live events. Here's an overview of what to do to get started working with StubHub International APIs.

 

  1. Create your StubHub International developer account
  2. Create your StubHub International user account
  3. Create your app and subscribe to Stubhub International APIs
  4. Get your access keys
  5. Webhook usage intent communication (Required for notifications)
  6. Generate an access token
  7. Webhook subscription and validation
  8. Start using our APIs

 

 

Create your StubHub International developer account

To start working with StubHub International APIs, you'll need to create a StubHub International developer account. Already have a StubHub International account? You'll still need to create a developer account, but you can use the same email address. From the home page, click Sign up, enter your info and allow 24 to 48 hours for the API Support Team to verify and approve your access.

 

 

Create your StubHub International user account

You'll also need a StubHub International user account to use the StubHub International APIs. If you don't already have one, head over to www.stubhub.ie to create an account. You'll need this account credentials to generate an access token for the app you'll create in the next step.

 

 

Create your app and subscribe to StubHub International APIs

Once you have a StubHub International developer account, you can create your app and subscribe to our APIs. Here's what you need to do:

 

  1. Sign in and click Apps in the header
  2. On the apps page, click Create an app
  3. Tell us about your app
  4. Choose the API products you want to subscribe to and click Create app

 

Get your access keys

After creating your app, you'll need access keys. Click the app name to view the consumer key and consumer secret. You'll use these keys to create an access token.

 

 

Webhook usage intent communication (Required for notifications)

If your integration requires real-time updates regarding inventory status or sales via webhooks, you must notify the API Support Team via email regarding your intent. Following this notification, you must await a confirmation from our team that your application has been appropriately configured for webhook functionality. This configuration process may take up to 24 hours. Note: You must not create any listings until this confirmation is received, as inventory created prior to the proper application configuration will not be eligible for webhook notifications.

 

 

Generate an access token
You'll need to include your access token in your HTTP requests so StubHub International can recognize and authenticate you. You'll need to refresh your token every 6 months.

 

To generate an access token:

  1. Concatenate your app’s consumer key and secret separated by a colon (:) like this - yourAppKey:yourAppSecret
  2. Generate the Base64 encoded value of this concatenated text.
  3. In the authorization header for generateToken API, enter Basic followed by the Base64 encoded value you generated. The header should look like this: "Authorization: Basic <base64encodedValue>"
  4. In the request body, send the email and password for the applicable StubHub International account you created, in Creating your StubHub International user account section above, in this format: { "username":"www.stubhub.ie account email", "password":"www.stubhub.ie account password" }

Important: The email/password you send in the request body must belong to an account created on www.stubhub.ie and NOT your developer account created on developer.stubhub.ie.

  1. Your access token will show up in the access_token field of the response

This token must be included in the authorization header of all subsequent API calls as a Bearer token. 

 

Here's an example CURL request:

curl -X POST --header "Authorization: Basic base64encodedValue​" --header "Content-Type: application/json" -d '{
   "username": "www.stubhub.ie account email",
   "password": "www.stubhub.ie account password"
}' https://api.stubcloudprod.com/sellers/oauth/accesstoken?grant_type=client_credentials

 

Webhook subscription and validation

Following the team’s confirmation of your App configuration, submit your webhook to the dedicated endpoint. Upon successful submission, you will receive a unique ID in the response. You must email this ID to the API Support Team for final activation. Please allow 24 to 48 hours for this approval process to conclude before creating any listings.

Here is an example webhook subscription request for sales notifications:

curl -X POST --header "Authorization: Bearer **********************" --header "Content-Type: application/json" -d '{
"callback": {
"url": "https://www.example.com/callback/test",
"auth": {
"authType": "oauth",
"tokenEndPoint": "https://www.example.com/tokenEndPoint/test",
"oauthRequest": {
"clientId": "someclientid",
"clientSecret": "somesecret",
"grantType": "client_credentials"
}
}
},
"subscription": {
"listing": [
"listing_sale"
]
}
}' https://api.stubcloudprod.com/partners/webhooks/v3

 

Using our APIs
Once you generate your access token and subscribe to our webhooks (if applicable), you can start using the APIs from the product lines you subscribe to. You can try any API directly on the developer portal by accessing the API page, filling out the required fields and body, and then submitting the request. The appropriate response will then display there. You can also copy the CURL command for the request directly from the developer portal. Check out our products section to read detailed API interface descriptions, and to learn how to configure your HTTP requests and use your access token in your HTTP requests.

Here's an example CURL request for creating a listing:

curl -X POST --header "Authorization: Bearer **********************" --header "Accept: application/json" --header "Content-Type: application/json" --header "Accept-Language: en-US" -d '{
    "eventId": 103619888,
    "pricePerProduct": { "amount": 100, "currency": "USD"},
    "externalListingId": 159632,
    "products": [
        {
            "externalId": "12",
            "row": "JD",
            "seat": "1",
            "productType": "TICKET",
            "ga": false
        },
        {
            "externalId": "13",
            "row": "JD",
            "seat": "2",
            "productType": "TICKET",
            "ga": false
        },
        {
            "externalId": "14",
            "row": "JD",
            "seat": "3",
            "productType": "TICKET",
            "ga": false
        }
    ],
    "stockType": ["PDF"],
    "paymentType": 1
}' "https://api.stubcloudprod.com/sellers/inventory/listings/v3"