Authentication Mutation

Authentication Mutation

Only authenticated users can access data from the Cricket API server. The Authentication Mutation provides the access token required for retrieving data using every other query. The token expires in 24 hours.
Cricket API Image

Sample Query

Here is a sample mutation for generating the access token.

Query Arguments

Here is what you would require to successfully generate your access token

api_key
Str required

Your API key, which is available in the console.

Your API key, which is available in the console.

Access & Limitations

We recommend you to understand the following concepts before you request a token from the server.

Validity of a tokenA generated token has a validity of 24 hours. After this, a new access token is required to fetch data. If the Auth Mutation is called more than once from the same device up to an hour before the expiry of an existing token, the server sends back the same access token. However, the validity of the token will not be reset.
Concurrency LimitThe access tokens have a concurrency limit for placing requests to other queries. It is possible to log in up to a maximum of 512,000 devices with a single account, and each device can send a maximum of 64 concurrent requests to the server. In case of situations where multiple devices are signed in with the same query key and are making calls simultaneously, it is recommended to use separate Device IDs and generate separate tokens. With multiple devices logged in, it is possible to make up to 32.7 million concurrent requests (512,000 x 64) to the server. The limits in concurrent requests can be customised for Enterprise level customers.
Securing the access tokenSubscribers are cautioned to store access tokens securely. Subscribers are charged on the basis of the number of query calls made, which means if someone manages to access our query with your leaked token, it will lead to incurring of charges on your account. Since the access token is extremely confidential, it is recommended not to expose the token nor to share it with others.

Downloads

Snapshots of the Auth Query in action under different scenarios that could help you in testing your app and understanding the responses in most cases.