Authenticating against Genius Sports APIs

Authentication Methods

Genius Sports APIs use OAuth2 (client_credentials) and API Keys (in headers) for authentication.

OAuth2

Before accessing any API, you have to authorize and get a token with your issued client credentials. All Genius Sports APIs use the same authorization endpoints, based on the environment you want to access:

You have to pass your retrieved authorization Token in an AUTHORIZATION header with each API request.

API Key

An issued API Key controls the available quotas, rate limits, and throttling.

You have to pass your API Key in an X-API-KEY header with each API request.

Example of Authentication Flow

Retrieve Auth Token, by using your client_id and client_secret from our Genius Sports TokenUrl endpoint specified in an OpenAPI definition (which will be the same across all APIs):

curl -d 'grant_type=client_credentials&client_id=YOUR-CLIENT-ID&client_secret=YOUR-CLIENT-SECRET' https://auth.api.geniussports.com/oauth2/token

You will receive a response with your access_token and expiration - the access token is valid for a specified number of seconds, after it expires, you will have to retrieve a new access token.

{ "access_token": "FZaWVNzaFhFZTdBPSIsImFsZyI6IlJTMjU2In0.eyJzdWIiOiI1OWdpZGQzNzVqbDV2Nm4yZjMwbmxqZ3YzOSIsInRva2VuX3VzZSI6ImFjY2VzcyIsInNjb3BlIjoibWF0Y2hzdGF0ZWFwaVwvZ3JhbnVsYXJpdHkucmVhZCBtYXRjaHN0YXRlYXBpXC9saXZlLnBvc3QgbWF0Y2hzdGF0ZWFwaVwvZ2xvYmFsIG1hdGNoc3RhdGVhcGlcL3NjaGVkdWxlLnJlYWQgbWF0Y2hzdGF0ZWFwaVwvbGl2ZS5yZWFkIG1hdGNoc3RhdGVhcGlcL2dyYW51bGFyaXR5LnBvc3QgbWF0Y2hzdGF0ZWFwaVwvc3BvcnQuMTAgbWF0Y2hzdGF0ZWFwaVwvc291cmNlLmxpdmVzdGF0cyBtYXRjaHN0YXRlYXBpXC9zb3VyY2UuaXNkIG1hdGNoc3RhdGVhcGlcL3NjaGVkdWxlLnBvc3QiLCJhdXRoX3RpbWUiOjE2MjIyMDAwNzAsImlzcyI6Imh0dHBzOlwvXC9jb2duaXRvLWlkcC5ldS13ZXN0LTEuYW1hem9uYXdzLmNvbVwvZXUtd2VzdC0xX3pZN0IxNzQ3ViIsImV4cCI6MTYyMjIwMzY3MCwiaWF0IjoxNjIyMjAwMDcwLCJ2ZXJzaW9uIjoyLCJqdGkiOiIwOWU2MDA2ZS0wYmEzLTRkZjItOTRkNy1jODg4MjJiNmZhMDkiLCJjbGllbnRfaWQiOiI1OWdpZGQzNzVqbDV2Nm4yZjMwbmxqZ3YzOSJ9.fQm845oplWyZy8FHHb9v64UFOOYTc9vYm2yWlA4pleikNwJg-VIxkrIv2JmhfdkTNQi5hLWpUQea8H3y7Yft7N9JSWBpIcNf5ttEh1rNvJlcopH746AtSPt-cWNL_q6d3mVXJt5uRzQFhOKMggYSrTvgbsqr9hajvJD5KbMEzsK5Kg9Wp9uF-QKnjg1GoACYy0ydmfJ9bX04ItsQZ4f4z780QO5g38_LSBknIAoHC-67rYvXODdfpB3xrNm-R4klF8mgb3r2sqcVO-8nnNAXbthNUU_3bUopNDdiTAVggVuQlkRYx6kshwe3ZJM5fzALbFrycIb12IA", "expires_in": 3600, "token_type": "Bearer" }

Save the access_token for further requests.

Query an API, by using the retrieved access_token and your API Key:

curl --location --request GET 'https://platform.matchstate.api.geniussports.com/api/v2/sources/GeniusPremium/sports/17/fixtures/9348000' \ --header 'x-api-key: ***' \ --header 'Authorization: ***'

You will receive a response containing the requested information, or an error if your access_token ( {"Message": "Access Denied"}) or your API Key ({"Message": "Unauthorized"}) is wrong.

Getting Access to Genius Sports Data

In order to get your OAuth2 client credentials and API Keys, please send your inquiry to apikey@geniussports.com

For technical support for an integrating customer please contact customerintegrations@geniussports.com. For live customers please contact, Genius Sports Support Team at the following address: support@geniussports.com.