GGaming APIDashboard
Developer API Usage

Use your API key with confidence

This page explains the complete developer workflow: create or retrieve a credential, keep it secure, authenticate requests, send parameters, inspect responses, handle failures, monitor activity and optimize application performance.

02 · API Key

Your API key is your application credential

API keys identify an integration when your backend communicates with protected Gaming API services. Generate keys from the developer dashboard and give each integration only the permissions it actually needs.

STEP 1

Create a key

Open API Keys, create a credential, select the required scope and copy the secret when it is presented.

STEP 2

Store it safely

Put the key in a server-side environment variable or secret manager. Do not commit it to GitHub or embed it in public HTML.

STEP 3

Use it server-side

Your backend attaches the credential to HTTPS requests. Your browser can call your backend without receiving the privileged key.

STEP 4

Rotate when necessary

Revoke exposed credentials and issue replacements. Separate development, testing and production credentials.

Never expose a secret API key: anything shipped to browser JavaScript, page source or a public repository should be considered visible to users.
03 · Requests

How to request data from the API

Use HTTPS from your trusted backend. The exact production hostname and endpoint paths must come from the deployed API contract; do not invent an endpoint based on this guide.

01 · ChooseSelect the endpoint and HTTP method.
02 · AuthenticateAttach the approved credential.
03 · ParametersSend valid query/body values.
04 · ValidateCheck HTTP status and payload.
05 · HandleRetry only safe transient failures.
JavaScript · server-side example
const response = await fetch(
  'https://YOUR-API-HOST/v1/resource',
  {
    method: 'GET',
    headers: {
      Authorization: `Bearer ${process.env.GAMING_API_KEY}`,
      Accept: 'application/json'
    }
  }
);

const data = await response.json();
Replace YOUR-API-HOST and the resource path with the exact endpoint published for your production API.
Request patterns

GET, POST and parameterized requests

GET

Read resources

Use GET when retrieving information. Query parameters are useful for filtering, pagination or selecting a resource.

POST

Create or trigger

Use POST only for operations defined by the API contract. Validate the response before treating an operation as successful.

JSON

Request body

For JSON endpoints, send an appropriate Content-Type and validate required fields before making the request.

POST example
const response = await fetch('https://YOUR-API-HOST/v1/resource', {
  method: 'POST',
  headers: {
    Authorization: `Bearer ${process.env.GAMING_API_KEY}`,
    'Content-Type': 'application/json'
  },
  body: JSON.stringify({ example: true })
});
04 · Responses

Understand what the server returns

Always inspect the HTTP status before processing a response as successful. A JSON body can contain useful error details even when the HTTP status indicates failure.

StatusMeaningTypical action
200Successful read or operationProcess the returned data.
201Resource createdStore the returned identifier if required.
400Invalid requestFix parameters; do not blindly retry.
401Authentication failedCheck credential validity and environment.
403Not authorizedCheck scopes and permissions.
429Rate limit reachedBack off and follow retry guidance.
5xxServer-side failureRetry carefully when the operation is safe.
Safe response handling
if (!response.ok) {
  throw new Error(`API request failed: ${response.status}`);
}

const data = await response.json();
05 · Real-time

Using live game updates

When the API exposes a production WebSocket gateway, use it for event-driven state updates rather than repeatedly polling an endpoint. Authentication and subscription rules must follow the deployed WebSocket contract.

WebSocket connection pattern
const socket = new WebSocket(
  'wss://YOUR-API-HOST/realtime'
);

socket.onopen = () => console.log('connected');
socket.onmessage = event => {
  const message = JSON.parse(event.data);
  console.log(message);
};
socket.onclose = () => console.log('disconnected');
Important: never put a long-lived privileged API key directly in a public WebSocket URL. Use the authentication mechanism defined by the production service.
06 · Errors

Errors, retries and idempotency

Client errors

400, 401 and 403 responses usually require a change to the request, credentials or permissions. Repeating the same request normally will not fix the problem.

Rate limits

429 means the service is asking you to slow down. Implement exponential backoff and respect Retry-After when supplied.

Transient failures

Some 5xx or network failures may be temporary. Retry with bounded exponential backoff and a maximum attempt count.

State-changing requests

For operations that change state, use an idempotency mechanism when the API contract provides one so retries do not accidentally duplicate an operation.

Bounded retry pattern
for (let attempt = 0; attempt < 3; attempt++) {
  try {
    // Make request here.
    break;
  } catch (error) {
    await new Promise(r =>
      setTimeout(r, 250 * 2 ** attempt)
    );
  }
}
07 · Limits

Rate limits and efficient usage

Do not assume a fixed limit unless it is published by your actual API. Build clients that can handle a changing limit safely.

Cache safe reads

Cache data that does not need second-by-second freshness and use conditional requests where supported.

Paginate

Request manageable pages instead of downloading unnecessarily large datasets in a single call.

Back off

When throttled, reduce request frequency rather than opening more concurrent connections.

08 · Activity

What your usage dashboard should show

The developer dashboard can provide a dedicated usage view for authenticated API activity. Useful metrics include request count, successful requests, errors, recent API access, active credentials and timestamps.

Requests
Success rate
Errors
Last check
09 · Performance

Measure API performance correctly

Latency shown by a browser health check measures the path from the user's browser to the public site. It is not the same as authenticated API latency. For real API performance, measure the actual API request from your backend and record status, duration and endpoint.

Checking public website reachability…
Recommended production metrics: p50 latency, p95 latency, p99 latency, request volume, error rate, timeout rate and WebSocket reconnect frequency.
10 · Security

Protect every request

Never log secrets

Redact API keys, access tokens, passwords and authorization headers from application logs.

Use HTTPS

Production API requests should use HTTPS. Real-time production connections should use WSS.

Least privilege

Use the smallest scope that your application needs and separate credentials by environment.

Rotate exposure

If a key is exposed, revoke it and issue a replacement immediately. Investigate where it was leaked.

FAQ

Common usage questions

Can I put my API key in my website JavaScript?

No. Browser code is visible to users. Use a secure backend to keep privileged credentials private.

How do I know the exact API endpoint?

Use the endpoint defined by your deployed API documentation. This page intentionally uses placeholders where a production endpoint has not been formally published.

Should every failed request be retried?

No. Client errors such as 400, 401 and 403 generally need correction. Retry only transient failures and use bounded backoff.

What is the difference between usage and performance?

Usage measures how much the API is being used. Performance measures how quickly and reliably requests and real-time connections are served.