The RSVote 3.0.X GUI plugin for Rust servers is currently in final development and will be released soon. This documentation provides a preview of the API and integration capabilities.
Get Notified on Release
RSVote.cs API Documentation
Integration guide for the Rust server vote tracking plugin
The RSGG.my API allows Rust server owners to create custom short URLs for their server voting pages. This API is compatible with the RSVote.cs Oxide plugin, which provides in-game voting functionality.
Using this API, server owners can create memorable, easy-to-share voting links like rsgg.my/your-server
instead of long URLs from voting sites.
API Endpoints
POST /api/create.php
Creates a custom short URL for a RustServers.gg server voting page.
Requires API key in Authorization header:
Authorization: Bearer your_api_key
{ "server_id": "12345", "custom_url": "my-server-name" // Optional }
Parameter | Type | Required | Description |
---|---|---|---|
server_id | String | Yes | Your RustServers.gg server ID |
custom_url | String | No | Custom URL segment (alphanumeric, hyphens). If not provided, server_id will be used. |
{ "success": true, "short_url": "https://rsgg.my/my-server-name", "message": "Short URL successfully created", "vote_url": "https://rustservers.gg/server/12345/" }
{ "success": false, "error_code": "ERROR_CODE", "message": "Error description" }
Error Code | Description |
---|---|
INVALID_CREDENTIALS | Invalid server ID or API key |
INVALID_REQUEST | Missing required fields |
INVALID_CUSTOM_URL | Custom URL contains invalid characters |
CUSTOM_URL_TAKEN | The requested custom URL is already in use |
DATABASE_ERROR | Error creating or updating the short URL |
RSVote.cs Plugin Compatibility
Integration Code Example
C# Example from RSVote.cs
// Generate a short URL for the server private void GenerateShortUrl(string serverId, string apiKey, string customUrlSegment, Action<bool, string> callback) { if (string.IsNullOrEmpty(serverId) || string.IsNullOrEmpty(apiKey)) { callback(false, "Server ID and API Key are required"); return; } // Validate custom URL segment if provided if (!string.IsNullOrEmpty(customUrlSegment)) { // Basic validation - should be alphanumeric with hyphens, no spaces if (!System.Text.RegularExpressions.Regex.IsMatch(customUrlSegment, "^[a-zA-Z0-9-]+$")) { callback(false, "Custom URL can only contain letters, numbers, and hyphens"); return; } } else { // Use server ID as the default customUrlSegment = serverId; } // URL to the rsgg.my API endpoint string apiUrl = "https://rsgg.my/api/create.php"; // Prepare the request payload Dictionary<string, object> payload = new Dictionary<string, object> { ["server_id"] = serverId, ["custom_url"] = customUrlSegment }; string json = JsonConvert.SerializeObject(payload); // Send the request to the API webRequests.Enqueue(apiUrl, json, (code, response) => { if (code == 200) { try { // Parse the response to get the generated short URL var data = JsonConvert.DeserializeObject<Dictionary<string, string>>(response); if (data.ContainsKey("short_url")) { // Update the config config.Api.ServerId = serverId; config.Api.Key = apiKey; config.General.VoteUrl = data["vote_url"]; SaveConfig(); callback(true, data["short_url"]); } else { callback(false, "Invalid response from URL service"); } } catch (Exception ex) { callback(false, $"Error parsing response: {ex.Message}"); } } else { callback(false, $"Error: API returned code {code}"); } }, this, RequestMethod.POST, new Dictionary<string, string> { ["Content-Type"] = "application/json", ["Authorization"] = $"Bearer {apiKey}" }); }
Frequently Asked Questions
When a player uses a short URL in the format rsgg.my/your-server/76561198xxxxxxxxx
, our system automatically appends their SteamID to the redirect URL. This ensures that the vote is properly attributed to the player on RustServers.gg.
Yes. The dashboard provides detailed analytics for your short URLs, including total clicks, unique visitors, and referral sources. You can see which URLs are performing best and optimize your voting campaigns accordingly.
Yes, as soon as we release 3.0.X on on Website and on Codefling you will need to update your plugin.
The short URL will still redirect them to the RustServers.gg voting page, but RustServers.gg will inform them they've already voted. This behavior is controlled by RustServers.gg, not by our shortlink service.
Need Help?
If you have any questions about the API or need assistance integrating it with your RSVote plugin, please contact our support team.
Contact Support