ball_lav ball_pink Asset 2 Dhoni have 144.78 Strike rate against MI 7 Batting performance of MSD with MI? Question Answer MSD performance with MI? ball_lav ball_pink Asset 2

Authentication API

To access any API, access token is required. Auth API provides the access token, by validating your request. Call Auth API whenever the access token is expired.

In the case of "Invalid Access Token" error, re-generate the access token. Generally, the access token be re-generated for every 24 hours from the time the access token is generated or whenever the API response throws "InvalidAccessToken" error.

Metric Group 100 & 100B

Request

  • Path: https://rest.cricketapi.com/rest/v2/auth/
  • Method POST
  • POST Params:

    • access_key - Required. Access key of your application.
    • secret_key - Required. Secret key of your application.
    • app_id - Required. Your app_id
    • device_id - Required. Unique id of the client device or browser.

Response

  • auth.access_token - String.Access token for your future requests.
  • auth.expires - String (long). Expiration date in unix epoch timestamp.

Example

CURL Command to authenticate your app.

$ curl -X POST \
    -d "access_key=YOUR_ACCESSKEY"\
    -d "secret_key=YOUR_SECRETKEY"\
    -d "app_id=YOUR_APPID"\
    -d "device_id=YOUR_DEVICEID"\
    https://rest.cricketapi.com/rest/v2/auth/

Metric Group 101

Request

  • Path: https://rest.cricketapi.com/rest/v4/auth/
  • Method POST
  • POST Params:

    • access_key - Required. Access key of your application.
    • secret_key - Required. Secret key of your application.
    • app_id - Required. Your app_id
    • device_id - Required. Unique id of the client device or browser.

Response

  • auth.access_token - String.Access token for your future requests.
  • auth.expires - String (long). Expiration date in unix epoch timestamp.

Example

CURL Command to authenticate your app.

$ curl -X POST \
    -d "access_key=YOUR_ACCESSKEY"\
    -d "secret_key=YOUR_SECRETKEY"\
    -d "app_id=YOUR_APPID"\
    -d "device_id=YOUR_DEVICEID"\
    https://rest.cricketapi.com/rest/v4/auth/

app_id, access_key & secret_key will be provided in Apps.

device_id can be any string. It is a device identification id.

Sample Response Of Auth API

{
    "status": true,
    "version": "2.0.2",
    "status_code": 200,
    "expires": "-1",
    "auth": {
        "access_token": "2s153724147994715s1209492282143811336",
        "push_servers": [
            {
                "host": "54.251.96.54",
                "port": "8000"
            }
        ],
        "expires": "1577200406.0"
    },
    "Etag": null,
    "cache_key": "auth|2sXXXX2414XXXX715s1209492282143811336|developer|"
}

View all Docs

True Support Center

Not sure, what plan to choose? Just get in touch us. We are committed to providing a solution to all sports data requirements. Feel free to write your technical questions, to know about best practice and guidelines.

000-800-040-1803 (Indian Tollfree Number)

+1 (855) 2SPORT4 (US Tollfree Number)