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.

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/

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":"2s14XXXX97325301s976461134951486121",
        "expires":"1521641451.0"
    },
    "Etag":null,
    "cache_key":"auth|2s14XXXX97325301s976461134951486121|app_id|"
}
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 kabaddi 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)