## Get Currently Configured Available Domain

This optional feature lets you retrieve the current domain configured for your region that is needed to launch our games or contact our game servers. While these domains are usually static, RubyPlay may update them due to regional or infrastructure changes. Using this endpoint ensures the correct domain is used in all cases.

If this function becomes required for your setup, the RubyPlay support team will advise accordingly.

### Regional Outage Impact

Regional outages affect only specific geographic areas, meaning that users located in the impacted region may be unable to launch our games. However, users in all other regions will remain unaffected until the issue is resolved.

### What You Can Do

To ensure uninterrupted access to the most up-to-date available domain, we recommend implementing a **polling mechanism** within your application that queries this endpoint at regular intervals.

* **Recommended polling frequency: Every 1 to 5 minutes** *(Adjust based on your service level agreements and tolerance for potential traffic impact.)*


If your current workflow assumes static URLs to access our game launcher or our game server, consider polling this endpoint before redirecting users or generating those links. This approach ensures resilience in the event of regional disruptions.

You can assume that the structure of the links you’ve been using so far has not changed.

For example, if you were using a URL like:

`https://rubyplay-domain-alpha.com/some/path?server_url=https://srv.rubyplay-domain-alpha.com`

and, after polling, you discover that the new available domain is `rubyplay-domain-beta.com`,
then you only need to update the URL to:

`https://rubyplay-domain-beta.com/some/path?server_url=https://srv.rubyplay-domain-beta.com`

Rate Limiting
Requests to this endpoint are rate-limited **per client**. If you choose to poll frequently, we strongly recommend implementing caching to reduce redundant requests.

**API Call Sample:**

```shell curl
curl -i -X GET \
  -u '<username>:<password>' \
  https://asia.stage.rubyplay.io/api/v1/available-domain
```

```json 200 application/json
{
  "domain": "dev.rubyplay.com"
}
```

```json 401 application/json
{
  "code": "NOT_AUTHORIZED",
  "message": "Authentication failed",
  "timestamp": "2026-01-25T14:30:00Z",
  "path": "/api/v1/available-domain"
}
```

```json 403 application/json
{
  "code": "INSUFFICIENT_SCOPE",
  "message": "Insufficient scope to access this resource. Required: domain:get",
  "timestamp": "2026-01-25T14:30:00Z",
  "path": "/api/v1/available-domain"
}
```

```json 500 application/json
{
  "code": "UNKNOWN_ERROR",
  "message": "Something went wrong",
  "timestamp": "2026-01-25T14:30:00Z",
  "path": "/api/v1/available-domain"
}
```

```json 504 application/json
{
  "code": "TIMEOUT",
  "message": "The server did not respond within the expected time",
  "timestamp": "2026-01-25T14:30:00Z",
  "path": "/api/v1/available-domain"
}
```

**Response Schema:**

```json
{
  "$ref": "#/components/schemas/AvailableDomainDto",
  "components": {
    "schemas": {
      "AvailableDomainDto": {
        "type": "object",
        "properties": {
          "domain": {
            "type": "string",
            "description": "The available domain for the game launcher",
            "example": "dev.rubyplay.com"
          }
        }
      }
    }
  }
}
```