# Accessing the API

If your integration is API-based, a service account needs to be provisioned instead of a user account. The provisioning request must be initiated through your Sportradar contact. Upon completion, you will receive the `client_id` and `client_secret`, which are used to authenticate via OAuth2 and access the Insight Tech APIs. For security reasons, these credentials should be stored securely and used according to your internal authentication policies.

### Environments

You will receive separate credentials and endpoints for each environment:

| Environment     | API Base URL                                                |
| --------------- | ----------------------------------------------------------- |
| **Integration** | `https://api.insighttechservices-nonprod.sportradar.dev/ci` |
| **Production**  | `https://api.insighttechservices.sportradar.com`            |

Start all development and testing in the **integration environment** before switching to production.

### API Authentication

All Insight Tech Services APIs use **OAuth 2.0 Client Credentials** for secure, server-to-server authentication.

#### OAuth Token Request

Send a POST request to the Auth0 token endpoint using your credentials:

<table><thead><tr><th width="84.092041015625">Field</th><th width="151.16497802734375"></th><th>Integration</th><th>Production</th></tr></thead><tbody><tr><td><strong>URL</strong></td><td></td><td><code>https://auth.sportradar.com/oauth/token</code></td><td><code>https://auth.sportradar.com/oauth/token</code></td></tr><tr><td><strong>Header</strong></td><td><code>Content-Type</code></td><td><code>application/x-www-form-urlencoded</code></td><td><code>application/x-www-form-urlencoded</code></td></tr><tr><td><strong>Data</strong></td><td><code>client_id</code></td><td><em>Received in the encrypted file.</em></td><td><em>Received in the encrypted file.</em></td></tr><tr><td></td><td><code>client_secret</code></td><td><em>Received in the encrypted file.</em></td><td><em>Received in the encrypted file.</em></td></tr><tr><td></td><td><code>audience</code></td><td><code>mts-insight-tech-non-prod</code></td><td><code>mts-insight-tech</code></td></tr><tr><td></td><td><code>grant_type</code></td><td><code>client_credentials</code></td><td><code>client_credentials</code></td></tr></tbody></table>

{% code title="Example Request" %}

```bash
curl -X POST 'https://auth.sportradar.com/oauth/token' \
--header 'Content-Type: application/x-www-form-urlencoded' \
--data-urlencode 'client_id=YOUR_CLIENT_ID' \
--data-urlencode 'client_secret=YOUR_CLIENT_SECRET' \
--data-urlencode 'audience=mts-insight-tech' \
--data-urlencode 'grant_type=client_credentials'
```

{% endcode %}

{% code title="Example response" %}

```json
{
    "access_token": "wk19ahxiOiJSUzI1NiIsInR5cCI6IkpXVCIsI...",
    "expires_in": 300,
    "token_type": Bearer"
}
```

{% endcode %}

The access\_token must be included in the Authorization header of all subsequent API requests. Tokens are valid for a relatively short timeframe (5 mins) and **must be reused during their validity timeframe**. Your application should refresh them automatically.

{% hint style="danger" %}
**Note**

Clients must reuse non-expired tokens. A new token should be requested only a few seconds before the existing one has expired.&#x20;
{% endhint %}

### What you need to start

To begin integration, ensure you have the following:

* Provisioned credentials (client\_id, client\_secret)
* Public/private key pair for decryption
* Access to integration API endpoints
* Understanding of supported models (see Model Catalogue)
* OAuth token setup
* An integration plan using `ticket-inform`, `ticket-placement`


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.sportradar.com/itservices/introduction/getting-started/accessing-the-api.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
