...
Ably Channel - Channels are the medium through which messages are distributed. Clients attach to channels to subscribe to messages, and every message published to a unique channel is broadcast by Ably to all subscribers. This messaging pattern is commonly called the https://en.wikipedia.org/wiki/Publish%E2%80%93subscribe_pattern. You can read more about Ably Channels here.Anchor AblyChannel AblyChannel Access Token - Ably’s authentication token required to establish a connection with Ably. You can learn more about this /wiki/spaces/FEED/pages/3248259146 here.
Client Library - Ably’s public open-source SDKs provided to clients to simplify the software development work required by users of Ably. More information is available here.
...
Inc drawio | ||||||||||||||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
...
Before you can start using the code below you will need to get the following secrets from Genius Sports Support Team:
...
Client ID
...
Client Secret
...
Client ID
Client Secret
API Key
To access uat environment, add .uat to the URLs documented in the section below:
https://uat.auth.api.geniussports.com/oauth2/token
https://platform.uat.matchstate.api.geniussports.com/api/v1
1. Obtaining an Access Token for the Match State Platform API
...
Code Block | ||
---|---|---|
| ||
var url = "https://auth.api.geniussports.com/oauth2/token"; var body = new Dictionary<string, string> { {"grant_type", "client_credentials"}, {"client_id", "CLIENT_ID"}, {"client_secret", "CLIENT_SECRET"} }; var httpClient = new HttpClient(); var response = await httpClient.PostAsync(url, new FormUrlEncodedContent(body)); var responseBody = await response.Content.ReadAsStringAsync(); var tokenEnvelope = JsonConvert.DeserializeObject<JObject>(responseBody); var accessToken = tokenEnvelope["access_token"].ToString(); |
Info |
---|
Please refer to Authenticating against Genius Sports APIs for more information about authenticating against our API’s in both the User Acceptance Testing and Production environments. |
2. Consuming the Fixture Schedule
...
Important: The FIXTURE_ID should be scheduled in a period of 7 between 5 days in the past and 2 days in the future, by the Match State Platform Schedule API in order for the Access Control API to return a channel & token.
...