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
| Variable | Value |
|---|---|
MINEXON_BASE_URL | HTTPS URL of the CMS installation, including its subdirectory if applicable. |
MINEXON_API_KEY | Bearer key created in the panel and stored on your server. |
MINEXON_COOKIE_JAR | Writable per-player cookie file for the cURL samples. |
MINEXON_PLAYER_COOKIE | Current 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
| Situation | What to do |
|---|---|
| JSON POST | Set Content-Type: application/json and send a JSON object of at most 1 MiB. POST endpoints also accept compatible form data. |
| File upload | Use multipart/form-data with the exact endpoint field names. Let your HTTP client set the boundary. |
| JSON data | Most 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 error | Read 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 step | Resolve 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 download | Check 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
| HTTP | Code or response | Action |
|---|---|---|
| 400 | invalid_request, method_override_not_supported | Check the JSON syntax and top-level object. Use the endpoint’s HTTP method directly. |
| 401 | invalid_api_key | Check the key’s value, expiry and revocation status. |
| 401 | player_authentication_required | Sign in and continue with the player’s current session. |
| 403 | ip_not_allowed, endpoint_not_allowed | Check the server’s outgoing IP and the key’s endpoint permissions. |
| 403 | forbidden | Check player access to the operation. |
| 404 | not_found | Check the route, locale, module and resource visibility. |
| 405 | method_not_allowed | Use the method listed in discovery. |
| 413 | payload_too_large | Reduce the JSON body to 1 MiB or less. |
| 422 | validation_failed, operation_failed or endpoint-specific data | Correct the fields using the reported errors and current form data. |
| 429 | rate_limit or endpoint-specific data | Wait 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.