Integration with Sportradar services typically involves machine-to-machine (M2M) communication. To access these services, external consumers (machines) must authenticate through Sportradar Common IAM, which is built on top of Auth0 Identity Provider.
Sportradar follows industry-standard security practices and uses OAuth 2.0 for authentication and OpenID Connect (OIDC) for identity management. These protocols securely authenticate both machine and human users and ensure safe, controlled access to Sportradar services.
Sportradar Common IAM environment for external customers:
https://auth.sportradar.comIn Sportradar, a Service Account refers to a machine user. It is an identity intended for programmatic, machine-to-machine authentication. A Service Account is used for M2M applications such as command-line tools (CLIs), daemons, or backend services that operate without user interaction and need to authenticate securely with APIs.
Sportradar supports two authentication methods for M2M authentication:
Both methods follow the OAuth 2.0 Client Credentials Grant Flow, as illustrated below. While the implementations differ, the resulting access_token uses the same format in both cases.
Your Sportradar contact will configure a Service Account for you and securely share the Client ID, Client Secret, and API audience identifier through Sportradar-approved secure communication channels, such as Keeper.
Self-management
Currently, there is no unified self-service interface for fully managing Service Accounts independently. You need to coordinate with your Sportradar contact to complete the configuration process.
In the future, a self-service mechanism is planned. It will let you manage Service Accounts, including secret operations, without manual intervention from Sportradar.
To authenticate a Service Account with Common IAM, follow these steps.
1. Client initiates the token request
Send a POST request to the Common IAM https://<COMMON-IAM-DOMAIN>/oauth/token endpoint with the required parameters.
HTTP request example
curl --request POST 'https://<COMMON-IAM-DOMAIN>/oauth/token' \
--header 'Content-Type: application/x-www-form-urlencoded' \
--data-urlencode 'grant_type=client_credentials' \
--data-urlencode 'client_id=SERVICE_ACCOUNT_ID' \
--data-urlencode 'client_secret=SERVICE_ACCOUNT_SECRET' \
--data-urlencode 'audience=API_IDENTIFIER'Parameters
client_id: Service Account IDclient_secret: Service Account secretaudience: Identifier of the API the client wants to accessgrant_type: Must be client_credentials<COMMON-IAM-DOMAIN>: The Common IAM environment domain, for example:
2. Receive the access token
If the request is valid, the response includes an access token, its type (Bearer), and its expiration time in seconds.
HTTP response example
{
"access_token": "YOUR_ACCESS_TOKEN",
"token_type": "Bearer",
"expires_in": 3600
}3. Store and reuse the access token for subsequent API requests
Include the issued access_token in the Authorization header as a Bearer token when making HTTP requests to Sportradar APIs.
Access token usage
curl -H "Authorization: Bearer eyJhbGciOi..." https://api.example.com/dataImportant
To avoid unnecessary HTTP calls, reduce load on the identity provider, and prevent rate-limit issues, the access token should be:
Recommended approach: Use an in-memory cache to store and automatically refresh the token just before, or when, it expires.
Access token format
{
"https://sportradar/common-iam/accounts": [
"{account_id associated with the provided credentials - this is usually the customer account ID in Sportradar}"
],
"iss": "https://{COMMON-IAM-DOMAIN}",
"sub": "{clientid}@clients",
"aud": "{api_identifier_to_which_this_token_was_issued}",
"iat": 1692866363,
"exp": 1692866663,
"
When using Private Key JWT authentication, you are responsible for generating a valid private/public key pair for authentication. You must securely share your public key with your Sportradar contact. They will configure the associated Service Account and register the public key for you. Your Sportradar contact will also share the API audience identifier and other required Service Account details.
Self-management
Currently, there is no unified self-service interface for fully managing Service Accounts independently. You need to coordinate with your Sportradar contact to complete the configuration process.
In the future, a self-service mechanism is planned. It will let you manage Service Accounts, including public key operations, without manual intervention from Sportradar.
This approach improves security by using asymmetric key pairs and avoids storing client secrets.
The authentication flow is illustrated below.
More details are available in Authenticate with Private Key JWT.
To authenticate a Service Account using Private Key JWT with Common IAM, follow these steps.
1. Generate an RSA key pair
Before your Sportradar contact configures a Service Account for authentication, you must first generate an RSA private/public key pair.
The public key must use the RS256, RS384, or PS256 algorithm, be encoded in PEM format, and be shared with your Sportradar contact person. The Sportradar contact person needs the following parameters when configuring the public key in Common IAM.
Example OpenSSL command
openssl genpkey -algorithm RSA -out private_key.pem -pkeyopt rsa_keygen_bits:2048
openssl rsa -in private_key.pem -pubout -out public_key.pemOnce generated:
2. Build the JWT assertion
The assertion is a JSON Web Token (JWT). It is a one-time-use token, so it should have a short expiry. We recommend a maximum lifetime of 1 minute.
You can:
The JWT should contain the following properties and claims.
alg: The algorithm used to sign the assertion. It must match the algorithm specified when generating the private/public key pair.kid (optional): The Common IAM (Auth0) generated kid for the public key. This kid is generated when the public key is added in Common IAM and must be shared with you by your Sportradar contact person.iss: Service Account ID. This is the Common IAM (Auth0) generated ID and must be shared with you by your Sportradar contact person.sub: Service Account ID. This is the Common IAM (Auth0) generated ID and must be shared with you by your Sportradar contact person.aud: The URL of the Auth0 tenant, which is the Common IAM domain, including the trailing slash. For example, https://auth.sportradar.com/iat (optional) and exp: Issued At and Expiration claims set to the correct timestamps. The client assertion is a one-time-use token, and the shortest possible expiry time is recommended. Auth0 supports a maximum token lifetime of 5 minutes.jti: A unique claim ID created by you. We recommend using the UUID format.The token must be signed with the private key generated in the first step. The maximum length of the JWT assertion is 2048 bytes.
More details are available in Authenticate with Private Key JWT.
JWT best practices
JWT structure
Header
{
"alg": "RS256",
"kid": "optional-key-id"
}Payload
{
"iss": "SERVICE_ACCOUNT_ID",
"sub": "SERVICE_ACCOUNT_ID",
"aud": "https://stg-auth.sportradar.com/",
"iat": 1710000000,
"exp": 1710000060,
"jti": "unique-uuid-string"
}Recommendation
We recommend generating the jti with a UUID.
JWT field constraints
iss | 64 characters |
sub | 64 characters |
jti | 64 characters |
alg | 16 characters |
3. Exchange the JWT for an access token
Once the JWT assertion is created and signed with your private key, you can exchange it for an access token by calling the Common IAM token endpoint. Send a POST request to https://<COMMON-IAM-DOMAIN>/oauth/token with the required parameters.
HTTP request example
curl --location --request POST 'https://<COMMON-IAM-DOMAIN>/oauth/token' \
--header 'Content-Type: application/x-www-form-urlencoded' \
--data-urlencode 'grant_type=client_credentials' \
--data-urlencode 'client_assertion_type=urn:ietf:params:oauth:client-assertion-type:jwt-bearer' \
--data-urlencode 'client_assertion=<your_signed_jwt>' \
--data-urlencode 'audience=https://golf.livedata.sportradar.com/Parameters
client_assertion: The JWT signed with your private keyclient_assertion_type: Always use urn:ietf:params:oauth:client-assertion-type:jwt-beareraudience: https://golf.livedata.sportradar.com/<COMMON-IAM-DOMAIN>: The Common IAM environment domain, for example:
4. Receive the access token
If the request is valid, the response includes an access token, its type (Bearer), and its expiration time in seconds.
HTTP response example
{
"access_token": "YOUR_ACCESS_TOKEN",
"token_type": "Bearer",
"expires_in": 3600
}5. Store and reuse the access token for subsequent API requests
Include the issued access_token in the Authorization header as a Bearer token when making HTTP requests to Sportradar APIs.
Access token usage
curl -H "Authorization: Bearer eyJhbGciOi..." https://golf.livedata.sportradar.com/Important
To avoid unnecessary HTTP calls, reduce load on the identity provider, and prevent rate-limit issues, the access token should be:
Recommended approach: Use an in-memory cache to store and automatically refresh the token just before, or when, it expires.
Access token format
{
"https://sportradar/common-iam/accounts": [
"{account_id associated with the provided credentials - this is usually the customer account ID in Sportradar}"
],
"iss": "https://{COMMON-IAM-DOMAIN}",
"sub": "{clientid}@clients",
"aud": "{api_identifier_to_which_this_token_was_issued}",
"iat": 1692866363,
"exp": 1692866663,
"
Access tokens issued through the Client Credentials Flow have a limited lifespan. To maintain secure and uninterrupted communication, track the token’s expiration time and renew it before it expires.
Your application should:
expires_in field returned with the tokenTip
Implement renewal logic that avoids simultaneous token re-requests from multiple threads or services whenever possible.
Using in-application caching is an effective way to:
The recommended approach is to implement a lightweight in-memory cache within your M2M application that:
Ensure your caching mechanism is thread-safe and supports concurrent requests in multithreaded environments.
An Okta document describes an additional solution for improving access-token handling in M2M communication. It is provided as a separate document. Check with your Sportradar contact person if you have not received it.
To enhance security and align with Sportradar security policies, rotate secrets and keys periodically. Ideally, do this quarterly, but at minimum once per year.
Not rotating secrets or keys does not immediately break existing integrations. However, your Sportradar contact may request rotation as part of regular security practices or audits.
Self-management
Currently, there is no unified self-service interface for rotating secrets or keys independently. You need to involve your Sportradar contact person to complete the rotation process.
In the future, a self-service mechanism is planned. It will let you rotate secrets or keys without involving Sportradar.
The rotation process differs for secrets used in Client ID and Client Secret authentication and keys used in Private Key JWT authentication.
Common IAM supports only one active client secret per Service Account at a time. However, you can still perform secret rotation without downtime by following the procedure below.
Prerequisites
Your system must be able to manage either:
CURRENT — the active secretNEXT — the new secret to use during rotationBy default, the system uses the CURRENT secret. If a client authentication error occurs during token exchange and indicates an issue with the client credentials, your system should be able to:
NEXT secret or the next secret in the listNEXT to CURRENT and discard the old secretSecret rotation steps
NEXT and inform your Sportradar contact.How zero-downtime rotation works
If your system is configured to fall back automatically to the NEXT secret:
NEXT.NEXT to CURRENT and discards the old secret.This process ensures zero downtime and avoids manual intervention during secret rotation.
Common IAM supports up to two active public keys per Service Account at the same time. This enables zero-downtime key rotation when you follow the steps below.
Option 1 — Single key configuration
If you prefer not to use the CURRENT and NEXT key approach from Option 2, you can maintain a single key in your configuration. Once your Sportradar contact confirms that the new public key is active in Common IAM for your Service Account, you can replace the old key with the new one in your system.
Prerequisites
Key rotation steps
1. Generate a new key pair
2. Activate the public key in Common IAM
3. Switch to the new key
Option 2 — CURRENT and NEXT keys configuration
Prerequisites
CURRENT private key to sign JWT assertionsNEXT keyNEXT to CURRENT and discard the old keyKey rotation steps
1. Generate a new key pair
NEXT key.2. Activate the public key in Common IAM
3. Switch to the new key
NEXT private key to CURRENT.How zero-downtime key rotation works
This approach ensures a seamless transition with no downtime:
NEXT key if the CURRENT key is rejected in Option 2 — CURRENT and NEXT keys configurationThis method avoids service disruptions and minimizes the need for manual intervention.
name | Name of the public key. |
algorithm | Algorithm used to sign assertions. Supported values are RS256, RS384, and PS256. If not specified, the default algorithm is RS256. |
pem | Public key, or X.509 certificate, encoded in PEM format. |
expiration date | Optional: When uploading a public key or certificate for a Service Account in Common IAM, you can define an expiration date. If no expiration is specified, the certificate is treated as non-expiring. It is possible to choose from the following options:
|