Skip to Content
MinexonMinexon

Quickstart

Connect to the Minexon v7 Player API, maintain player sessions, and handle API responses.

In your CMS dashboard, open System → API Keys and create a key for your application. Select the GET and POST permissions your workflow needs and allow the application server’s outgoing IP. The CMS shows the secret once. Store it in your server’s secret store and inject it as MINEXON_API_KEY for the examples. Send Authorization: Bearer <key> on every API request over HTTPS. Create and manage API keys

Check your connection

Use your Minexon CMS origin as BASE_URL and run this request from an allowed IP.

BASE_URL='https://cms.example.com'

curl --silent --show-error --fail-with-body \
  -H "Authorization: Bearer $MINEXON_API_KEY" \
  "$BASE_URL/api/v1/operations"

data groups the key’s allowed operations by category. Each entry contains a method and path. Player paths include {locale}, which you can replace with en or tr. The discovery URL itself has no locale segment. captcha lists enabled challenges for the permitted flows. Each entry contains provider, site_key, and flow. Discovery reference

Sample settings

VariableValue
MINEXON_BASE_URLHTTPS URL of the CMS installation, including its subdirectory if applicable.
MINEXON_API_KEYBearer key created in the panel and stored on your server.
MINEXON_COOKIE_JARWritable per-player cookie file for the cURL samples.
MINEXON_PLAYER_COOKIECurrent player Cookie header value in the Node.js samples. Process and store Set-Cookie updates separately for each player.

Maintain a player session

The bearer key authenticates your application. A private player operation also needs that player’s session. Store the CMS cookies separately for each player, process every Set-Cookie update, and send the current cookies on the next request. Keep the same session through sign-in, verification, cart changes and checkout. Site modules, account restrictions and player permissions still apply. Session and checkout examples

Send requests and read responses

SituationWhat to do
JSON POSTSet Content-Type: application/json and send a JSON object of at most 1 MiB. POST endpoints also accept compatible form data.
File uploadUse multipart/form-data with the exact endpoint field names. Let your HTTP client set the boundary.
JSON dataMost reads put the result in data. Some endpoints return their own shape, such as the top-level count from adding to the cart.
Validation or operation errorRead the HTTP status and inspect error, errors and data.error or data.errors where the endpoint provides them. A response may also include notices.
Next stepResolve a relative next against the CMS origin. It can refer to a regular CMS page or an external provider. Use the endpoint reference to choose the next API call. Keep the bearer header on CMS API requests only.
Binary downloadCheck the status and Content-Type before writing the response body as a file. Use Content-Disposition when present. A failed download can return JSON.

Use values returned by the applicable GET before submitting a form that requires _submission or comment _nonce. The API handles browser form fields such as _token, _promo_token, and _coupon_token.

Errors

HTTPCode or responseAction
400invalid_request, method_override_not_supportedCheck the JSON syntax and top-level object. Use the endpoint’s HTTP method directly.
401invalid_api_keyCheck the key’s value, expiry and revocation status.
401player_authentication_requiredSign in and continue with the player’s current session.
403ip_not_allowed, endpoint_not_allowedCheck the server’s outgoing IP and the key’s endpoint permissions.
403forbiddenCheck player access to the operation.
404not_foundCheck the route, locale, module and resource visibility.
405method_not_allowedUse the method listed in discovery.
413payload_too_largeReduce the JSON body to 1 MiB or less.
422validation_failed, operation_failed or endpoint-specific dataCorrect the fields using the reported errors and current form data.
429rate_limit or endpoint-specific dataWait before retrying and honor Retry-After when present.

For endpoint-specific fields, see the API reference. For examples that combine multiple endpoints, see API workflow examples.