# Real App

Keep your players connected to the city even when they’re away from the PC. Follow the timeline, reply to messages, scroll the feed and join live moments — all from a real iOS & Android app.

{% hint style="danger" %}
**Compatible with Gksphone v2.3.0 and above.**
{% endhint %}

\
[App Store](https://apps.apple.com/tw/app/gksphone/id6694655432?l=en-GB)

[Play Store](https://play.google.com/store/apps/details?id=org.gkshop.gksphone\&hl=en)

This document explains how to register and manage servers via the Discord bot.

### Prerequisites

* To use these commands, you must have the designated **GKSPHONE** **role** on the [Discord server](https://discord.gg/XUck63E).
* The server you want to register must have `gksphone` (or relevant phone script) integration enabled. Ensure that `Config.RealApplication = true` is set in the `gksphone/config/config.lua` file.
* In `gksphone/config/config.lua`, fill in the `Config.RealAppJoinCode` field. You must enter the serverid.

### Commands

You can perform the following actions in the [commands channel](https://discord.com/channels/577869674801397760/944679337112772618) under the General category using the commands below.

#### 1. Register Server (`/addserver`)

Used to register a new FiveM server into the system.

<mark style="color:$warning;">**Public servers do not require endpoints. Private servers require endpoints.**</mark>

* **Usage:** `/addserver serverid:<CFX_JOIN_ID> [endpoint:http://ip:port]`
* **Example:** `/addserver serverid:a8q9z5 endpoint:123.45.67.89:30120`
* **Process:**
  1. The bot validates server information using the provided Server ID.
  2. If the server is active and accessible, a menu appears asking which applications (Apps) you want to use.
  3. Once apps are selected, the server registration is complete.

#### 2. List My Servers (`/listservers`)

Displays a list of all servers registered by you, along with their active applications.

* **Usage:** `/listservers`
* **Process:**
  * The bot lists the names, IDs, and selected applications of your registered servers.

#### 3. Edit Server (`/editserver`)

Used to modify the application (App) settings of a previously registered server. Only the user who originally registered the server can use this command.

<mark style="color:$warning;">**Public servers do not require endpoints. Private servers require endpoints.**</mark>

* **Usage:** `/editserver serverid:<CFX_JOIN_ID> [endpoint:http://ip:port]`
* **Example:** `/editserver serverid:a8q9z5`
* **Process:**
  1. The bot checks if you are the owner of the server.
  2. It re-opens the application selection menu.
  3. You can update the server configuration by making new selections.

#### 4. Remove Server (`/removeserver`)

Used to permanently remove a registered server from the system.

* **Usage:** `/removeserver serverid:<CFX_JOIN_ID>`
* **Example:** `/removeserver serverid:a8q9z5`
* **Process:**
  * The server record is permanently deleted from the database.

### How to Find Server ID?

You can find your CFX Join ID in the URL structure of your server's join link.

1. Locate your server on the FiveM server list or Keymaster.
2. Look at the URL (e.g., `https://cfx.re/join/a8q9z5`).
3. The last part of the URL **(e.g., a8q9z5)** is your **Server ID**.

<figure><img src="https://1859156681-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Ft4ljavSyu0jJXdm0X9Pd%2Fuploads%2F92fcUI8486eLE968c4CJ%2Fcfx_server_id_guide_1769784257900.png?alt=media&#x26;token=d12fc454-198d-4285-98ae-c4c34d4e0421" alt="" width="188"><figcaption></figcaption></figure>

### FAQ / Error Messages

* **"Server is not responding to gksphone..."**: Either `gksphone` is not running on your server, or it is not accessible externally. Check your `gksphone/config/config.lua` settings.
* **"You do not have permission..."**: You do not have the required Discord role to use this command.
* **"Server not found or you are not the owner"**: No server record was found with the specified ID, or it was registered by another user.
