> For the complete documentation index, see [llms.txt](https://docs.sportradar.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.sportradar.com/transaction30api/sandbox/connectivity.md).

# Connectivity

## Connection endpoints

WebSocket over TLS 1.2/1.3.

| Transaction 3.0 API                                                                         |
| ------------------------------------------------------------------------------------------- |
| WebSocket connection to send transaction v3.0 API requests and receive responses            |
| **Client integration environment** Host: `wss.dataplane-nonprod.sportradar.dev` Port: `443` |

## Authentication

Before connecting to the connection endpoint above, the client must obtain a token. To obtain the token, a POST request must be made to [**https://auth.sportradar.com/oauth/token**](https://auth.sportradar.com/oauth/token). The request must include a Content-Type header and in the body, 4 url encoded key-value pairs are required.

|                                   | Attribute name | Attribute value                                                          |
| --------------------------------- | -------------- | ------------------------------------------------------------------------ |
| Header                            | Content-Type   | application/x-www-form-urlencoded                                        |
| Body - url encoded key value pair | client\_id     |                                                                          |
| Body - url encoded key value pair | client\_secret |                                                                          |
| Body - url encoded key value pair | audience       | Transaction 3.0 API, Client integration environment: mbs-dp-non-prod-wss |
| Body - url encoded key value pair | grant\_type    | client\_credentials                                                      |

**Example using cURL:**

```xml
curl -L -X POST 'https://auth.sportradar.com/oauth/token' \
--header 'Content-Type: application/x-www-form-urlencoded' \
--data-urlencode 'client_id=<provided client id>' \
--data-urlencode 'client_secret=<provided client secret>' \
--data-urlencode 'audience=mbs-dp-non-prod-wss' \
--data-urlencode 'grant_type=client_credentials'
```

The request returns a JSON response with "accesstoken" field/attribute that is necessary to establish a WebSocket connection:

```json
{
    "access_token": "GENERATED_TOKEN",
    "expires_in": 1200,
    "token_type": "Bearer"
}
```

When establishing a connection to the WebSocket, the value of accesstoken must be provided in an Authorization header. The value of the header must be: Bearer GENERATED\_TOKEN, where GENERATED\_TOKEN must be replaced with the value obtained from the JSON response.

**Example using wscat:**

```xml
wscat -H "Authorization: Bearer GENERATED_TOKEN" --connect wss://wss.dataplane-nonprod.sportradar.dev
```

The accesstoken must be included in the Authorization header of all subsequent API requests. Tokens are valid for 20 minutes and **must be reused within that timeframe**. If the token has expired, follow the procedure outlined above to generate a new one.

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

Clients must reuse non-expired tokens. Request a new token only a few seconds before the existing one expires.
{% endhint %}

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

If you believe your credentials have been compromised or accessed without authorization, please contact your Operational Account Manager (OAM), Service Delivery Manager (SDM), or email <MTS-servicedelivery@sportradar.com>, and we will rotate your Client ID and/or Client Secret.
{% endhint %}

## Connections

To establish a connection, a token is required (see above). Maximum connection duration is 2h. After 2h, the connection is automatically terminated, and a new connection must be established with a new token. Each client's node should establish at least one WebSocket connection to the MTS endpoint. MTS servers will reply through the same connection on which they received the request. If a connection terminates unexpectedly, the client should resend all requests for which it did not receive a response. For such requests, MTS will reply with the original response (the same response it would have received if the connection had not terminated).

## Rate Limiting

MTS performs the client request rate limiting described below. The values are valid:

* Per client
* For all request types (operation types) combined

| Requests per second | Requests per minute |
| ------------------- | ------------------- |
| 500                 | 5.000               |

## Limitations

The maximum supported WebSocket frame size is 32 KB. The maximum supported message payload size is 128 KB. Because of the 32 KB WebSocket frame-size quota, messages larger than 32 KB must be split into multiple frames, each 32 KB or smaller (maximum of 4 frames). If the receiver gets a larger message (or a larger frame size), it closes the connection with code 1009.

## Avoid IP-based whitelisting

{% hint style="danger" %}
Clients should avoid IP-based whitelisting for WebSocket connections to MBS Dataplane because WebSocket connections are provided through the AWS API Gateway. AWS dynamically manages the underlying infrastructure, so IPs may change without notice. Whitelisting specific IPs may cause unintended connectivity failures. Any issues resulting from these configurations are the client's sole responsibility and are considered a known risk.\
Instead, clients should rely on TLS-secured WebSocket (wss\://) connections with MBS Dataplane. There is a valid server certificate from the TLS handshake, which clients should verify based on the Fully Qualified Domain Name (FQDN) they are connecting to: <wss://wss.dataplane.sportradar.com/>

By verifying the server certificate against this FQDN, clients ensure a secure and trusted connection without relying on static IPs.
{% endhint %}


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## 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, and the optional `goal` query parameter:

```
GET https://docs.sportradar.com/transaction30api/sandbox/connectivity.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

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.
