How to Integrate a Game

How to Integrate a Game

  • Quick Integration
  • Complete Integration
  • The Platform
  • Help

›Releases API

Complete Guide Overview

  • Complete Guide Overview

1. Panel Guide

  • 1.0. Panel Access
  • 1.1. Create a new game
  • 1.2. Game Configuration
  • 1.3. Shop

    • Shop introduction
    • 1.3.1. Shop Wizard
    • 1.3.2. Shop Offers
    • 1.3.3. Shop Coupons
    • 1.3.4. Shop Themes
    • 1.3.5. Test shop
  • 1.4. Multi-Language
  • 1.5. Releases
  • 1.6. DLCs
  • 1.7. Store Content
  • 1.8. Content
  • 1.9. WebSection
  • 1.10 Purchase Report

    • 1.10.1. Dashboard
    • 1.10.2 Client & App
    • 1.10.3 Gamer Level
    • 1.10.4 Region & Country
    • 1.10.5 Purchase Notifications
    • 1.10.6 Sales Wallet
    • 1.10.7 Player Summary

    1.11 Stats Report

    • 1.11.1. Leads
    • 1.11.2. Retention
    • 1.11.4. Login
    • 1.11.4. Payment
    • 1.11.5. Wishlist

2. Login Guide

  • 2.0. Login overview
  • 2.1. Login with Unity
  • 2.2. Login with C#
  • 2.3. Login with C++/Unreal
  • 2.4. Login with HTTP
  • 2.5. Login with Web Service Definition Language (WSDL)

3. Payments Guide

  • 3.0. First of All
  • 3.1. Payments Integration

4. API Guide

    Releases API

    • Releases Workflow
    • C# example

Glossary

  • Glossary

C# example

API calls examples

//Receive all the releases available in the panel for a game
//gameId:       Game id in IDCGames admin panel, provided by IDCGames
//gameSecret:   Game keyword in IDCGames admin panel, provided by IDCGames
private void listExistingReleases(string gameId, string gameSecret)
        {
            WebClient wc = new WebClient();
            wc.Headers.Add("GameID", gameId);
            wc.Headers.Add("GameSecret", gameSecret);
            try
            {
                string releasesJsonString = wc.DownloadString("https://admin.idcgames.com/api/release");
                parseReleasesJson(releasesJsonString);
            }
            catch (WebException wex)
            {
                string response = "";
                string statusCode = wex.Status.ToString();
                if (wex.Response != null)
                {
                    using (StreamReader r = new StreamReader(wex.Response.GetResponseStream()))
                    {
                        response = r.ReadToEnd();
                    }

                }
                if (response != "")
                {
                    MessageBox.Show("Error downloading game releases from IDC Games panel" + Environment.NewLine + response);
                }
                else
                {
                    MessageBox.Show("Error downloading game releases from IDC Games panel" + Environment.NewLine + wex.ToString());
                }
            }
            catch (Exception ex)
            {
                MessageBox.Show("Error downloading game releases from IDC Games panel");
            }
        }
//Receive current active release data for a game
        //gameId:       Game id in IDCGames admin panel, provided by IDCGames
        //gameSecret:   Game keyword in IDCGames admin panel, provided by IDCGames
        private void getActiveRelease(string gameId, string gameSecret)
        {
            WebClient wc = new WebClient();
            wc.Headers.Add("GameID", gameId);
            wc.Headers.Add("GameSecret", gameSecret);
            try
            {
                string releasesJsonString = wc.DownloadString("https://admin.idcgames.com/api/release/active");
                parseReleasesJson(releasesJsonString);
            }
            catch (WebException wex)
            {
                string response = "";
                string statusCode = wex.Status.ToString();
                if (wex.Response != null)
                {
                    using (StreamReader r = new StreamReader(wex.Response.GetResponseStream()))
                    {
                        response = r.ReadToEnd();
                    }

                }
                if (response != "")
                {
                    MessageBox.Show("Error downloading active release from IDC Games panel" + Environment.NewLine + response);
                }
                else
                {
                    MessageBox.Show("Error downloading active release from IDC Games panel" + Environment.NewLine + wex.ToString());
                }
            }
            catch (Exception ex)
            {
                MessageBox.Show("Error downloading active release from IDC Games panel");
            }
        }
//Create a new release (a copy of the last release)
        //gameId:       Game id in IDCGames admin panel, provided by IDCGames
        //gameSecret:   Game keyword in IDCGames admin panel, provided by IDCGames
        //releaseName:  Release Name or version
        private void createRelease(string gameId, string gameSecret, string releaseName)
        {
            WebClient wc = new WebClient();
            wc.Headers.Add("GameID", gameId);
            wc.Headers.Add("GameSecret", gameSecret);
            //Required in order to post parameters
            wc.Headers[HttpRequestHeader.ContentType] = "application/x-www-form-urlencoded";
            releaseName = System.Web.HttpUtility.UrlPathEncode(releaseName);
            string parameters = $"rel_name={releaseName}";
            try
            {
                string releasesJsonString = wc.UploadString("https://admin.idcgames.com/api/release", parameters);
                parseCreateOrModifyReleaseJson(releasesJsonString);
            }
            catch (WebException wex) {
                string response = "";
                string statusCode = wex.Status.ToString();
                if (wex.Response != null)
                {
                    using (StreamReader r = new StreamReader(wex.Response.GetResponseStream()))
                    {
                        response = r.ReadToEnd();
                    }

                }
                if (response != "")
                {
                    MessageBox.Show("Error creating game release in IDC Games panel" + Environment.NewLine + response);
                }
                else
                {
                    MessageBox.Show("Error creating game releases¡ in IDC Games panel" + Environment.NewLine + wex.ToString());
                }
            }
            catch (Exception ex)
            {
                MessageBox.Show("Error creating game releases¡ in IDC Games panel" + Environment.NewLine + ex.ToString());
            }
        }
//Modify an existing release
        //gameId:           Game id in IDCGames admin panel, provided by IDCGames
        //gameSecret:       Game keyword in IDCGames admin panel, provided by IDCGames
        //releaseID:        Release id (received in createRelease, getActiveRelease or listExistingReleases)
        //releaseName:      Release Name or version
        private void modifyRelease(string gameId, string gameSecret, int releaseId, string releaseName)
        {
            WebClient wc = new WebClient();
            wc.Headers.Add("GameID", gameId);
            wc.Headers.Add("GameSecret", gameSecret);
            //Required in order to post parameters
            wc.Headers[HttpRequestHeader.ContentType] = "application/x-www-form-urlencoded";
            releaseName = System.Web.HttpUtility.UrlPathEncode(releaseName);
            string parameters = $"rel_name={releaseName}";
            try
            {
                string modifyReleaseApiUrl = $"https://admin.idcgames.com/api/release/update/{releaseId}";
                string releasesJsonString = wc.UploadString(modifyReleaseApiUrl, parameters);
                parseCreateOrModifyReleaseJson(releasesJsonString);
            }
            catch (WebException wex)
            {
                string response = "";
                string statusCode = wex.Status.ToString();
                if (wex.Response != null)
                {
                    using (StreamReader r = new StreamReader(wex.Response.GetResponseStream()))
                    {
                        response = r.ReadToEnd();
                    }

                }
                if (response != "")
                {
                    MessageBox.Show("Error creating game release in IDC Games panel" + Environment.NewLine + response);
                }
                else
                {
                    MessageBox.Show("Error creating game releases¡ in IDC Games panel" + Environment.NewLine + wex.ToString());
                }
            }
            catch (Exception ex)
            {
                MessageBox.Show("Error creating game releases¡ in IDC Games panel" + Environment.NewLine + ex.ToString());
            }
        }

//Create a ftp account to upload release files. Once the accounts are created, ftp data can be received calling getReleaseFtpAccounts
        //gameId:           Game id in IDCGames admin panel, provided by IDCGames
        //gameSecret:       Game keyword in IDCGames admin panel, provided by IDCGames
        //releaseID:        Release id (received in createRelease, getActiveRelease or listExistingReleases)
        //ftpType:          0 for release
        //                  1 for DLC
        //ftpFolderType:    redist for redistribuible files
        //                  common for files with the same format in x86 and x6 systems
        //                  uncommon for files for x86 systems, wich should be included in x86 folder and files for x64 systems, wich should be included in x64 folder
        //sourcePublicIp:   public source ip for uploading files with ftp. Leave blank if api is called from the same ip as ftp upload
        //hours:            ftp account lifetime in hours
        void createReleaseFtpAccount(string gameId, string gameSecret, int releaseID, int ftpType, string ftpFolderType, string sourcePublicIp, int hours)
        {
            WebClient wc = new WebClient();
            wc.Headers.Add("GameID", gameId);
            wc.Headers.Add("GameSecret", gameSecret);
            //Required in order to post parameters
            wc.Headers[HttpRequestHeader.ContentType] = "application/x-www-form-urlencoded";
            string ipParam = "";
            if (sourcePublicIp != "")
            {
                ipParam = $"&ip={sourcePublicIp}";
            }
            string parameters = $"rel_dlc={ftpType}&rel_dir={ftpFolderType}&hours={hours}{ipParam}";
            try
            {
                string ftpApiUrl = $"https://admin.idcgames.com/api/release/ftp/{releaseID}";
                string createFtpAccountJsonString = wc.UploadString(ftpApiUrl, parameters);
                parseCreateFtpAccountJson(createFtpAccountJsonString);
            }
            catch (WebException wex)
            {
                string response = "";
                string statusCode = wex.Status.ToString();
                if (wex.Response != null)
                {
                    using (StreamReader r = new StreamReader(wex.Response.GetResponseStream()))
                    {
                        response = r.ReadToEnd();
                    }

                }
                if (response != "")
                {
                    MessageBox.Show("Error creating ftp account in IDC Games panel" + Environment.NewLine + response);
                }
                else
                {
                    MessageBox.Show("Error creating ftp account in IDC Games panel" + Environment.NewLine + wex.ToString());
                }
            }
            catch (Exception ex)
            {
                MessageBox.Show("Error creating ftp account in IDC Games panel" + Environment.NewLine + ex.ToString());
            }
        }
//Get available ftp accounts for a release
        //gameId:           Game id in IDCGames admin panel, provided by IDCGames
        //gameSecret:       Game keyword in IDCGames admin panel, provided by IDCGames
        //releaseID:        Release id (received in createRelease, getActiveRelease or listExistingReleases)
        void getReleaseFtpAccounts(string gameId, string gameSecret, int releaseID)
        {
            WebClient wc = new WebClient();
            wc.Headers.Add("GameID", gameId);
            wc.Headers.Add("GameSecret", gameSecret);
            //Required in order to post parameters
            wc.Headers[HttpRequestHeader.ContentType] = "application/x-www-form-urlencoded";
            string ipParam = "";
            try
            {
                string ftpApiUrl = $"https://admin.idcgames.com/api/release/ftp/{releaseID}";
                string ftpAccountsJsonString = wc.DownloadString(ftpApiUrl);
                parseGetReleaseFTPAccountsJson(ftpAccountsJsonString);
            }
            catch (WebException wex)
            {
                string response = "";
                string statusCode = wex.Status.ToString();
                if (wex.Response != null)
                {
                    using (StreamReader r = new StreamReader(wex.Response.GetResponseStream()))
                    {
                        response = r.ReadToEnd();
                    }

                }
                if (response != "")
                {
                    MessageBox.Show("Error downloading release ftp accounts from IDC Games panel" + Environment.NewLine + response);
                }
                else
                {
                    MessageBox.Show("Error downloading release ftp accounts from IDC Games panel" + Environment.NewLine + wex.ToString());
                }
            }
            catch (Exception ex)
            {
                MessageBox.Show("Error downloading release ftp accounts from IDC Games panel" + Environment.NewLine + ex.ToString());
            }

        }
//Pusblish a release and start synchronizing files
        //gameId:           Game id in IDCGames admin panel, provided by IDCGames
        //gameSecret:       Game keyword in IDCGames admin panel, provided by IDCGames
        //releaseID:        Release id (received in createRelease, getActiveRelease or listExistingReleases)
        void publishRelease(string gameId, string gameSecret, int releaseID)
        {
            WebClient wc = new WebClient();
            wc.Headers.Add("GameID", gameId);
            wc.Headers.Add("GameSecret", gameSecret);
            //Required in order to post parameters
            wc.Headers[HttpRequestHeader.ContentType] = "application/x-www-form-urlencoded";
            string ipParam = "";
            try
            {
                string publishReleaseApiUrl = $"https://admin.idcgames.com/api/release/publish/{releaseID}";
                string publishReleaseJsonString = wc.UploadString(publishReleaseApiUrl, ipParam);
                parsePublishReleaseJson(publishReleaseJsonString);
            }
            catch (WebException wex)
            {
                string response = "";
                string statusCode = wex.Status.ToString();
                if (wex.Response != null)
                {
                    using (StreamReader r = new StreamReader(wex.Response.GetResponseStream()))
                    {
                        response = r.ReadToEnd();
                    }

                }
                if (response != "")
                {
                    MessageBox.Show("Error publishing release in idc panel" + Environment.NewLine + response);
                }
                else
                {
                    MessageBox.Show("Error publishing release in idc panel" + Environment.NewLine + wex.ToString());
                }
            }
            catch (Exception ex)
            {
                MessageBox.Show("Error publishing release in idc panel" + Environment.NewLine + ex.ToString());
            }

        }
//Check synchronization status for a published release
        //gameId:           Game id in IDCGames admin panel, provided by IDCGames
        //gameSecret:       Game keyword in IDCGames admin panel, provided by IDCGames
        //releaseID:        Release id (received in createRelease, getActiveRelease or listExistingReleases)
        void checkSynchronization(string gameId, string gameSecret, int releaseID)
        {
            WebClient wc = new WebClient();
            wc.Headers.Add("GameID", gameId);
            wc.Headers.Add("GameSecret", gameSecret);
            //Required in order to post parameters
            wc.Headers[HttpRequestHeader.ContentType] = "application/x-www-form-urlencoded";
            string ipParam = "";
            try
            {
                string checSynchronizationApiUrl = $"https://admin.idcgames.com/api/release/check_sync/{releaseID}";
                string checSynchronizationJsonString = wc.DownloadString(checSynchronizationApiUrl);
                parseCheckSynchronizationJson(checSynchronizationJsonString);
            }
            catch (WebException wex)
            {
                string response = "";
                string statusCode = wex.Status.ToString();
                if (wex.Response != null)
                {
                    using (StreamReader r = new StreamReader(wex.Response.GetResponseStream()))
                    {
                        response = r.ReadToEnd();
                    }

                }
                if (response != "")
                {
                    MessageBox.Show("Error publishing release in idc panel" + Environment.NewLine + response);
                }
                else
                {
                    MessageBox.Show("Error publishing release in idc panel" + Environment.NewLine + wex.ToString());
                }
            }
            catch (Exception ex)
            {
                MessageBox.Show("Error publishing release in idc panel" + Environment.NewLine + ex.ToString());
            }

        }

//Activate a release
        //gameId:           Game id in IDCGames admin panel, provided by IDCGames
        //gameSecret:       Game keyword in IDCGames admin panel, provided by IDCGames
        //releaseID:        Release id (received in createRelease, getActiveRelease or listExistingReleases)
        void activateRelease(string gameId, string gameSecret, int releaseID)
        {
            WebClient wc = new WebClient();
            wc.Headers.Add("GameID", gameId);
            wc.Headers.Add("GameSecret", gameSecret);
            //Required in order to post parameters
            wc.Headers[HttpRequestHeader.ContentType] = "application/x-www-form-urlencoded";
            string ipParam = "";
            try
            {
                string activateReleaseApiUrl = $"https://admin.idcgames.com/api/release/activate/{releaseID}";
                string activateReleaseJsonString = wc.UploadString(activateReleaseApiUrl, ipParam);
                parseReleaseActivationJson(activateReleaseJsonString);
            }
            catch (WebException wex)
            {
                string response = "";
                string statusCode = wex.Status.ToString();
                if (wex.Response != null)
                {
                    using (StreamReader r = new StreamReader(wex.Response.GetResponseStream()))
                    {
                        response = r.ReadToEnd();
                    }

                }
                if (response != "")
                {
                    MessageBox.Show("Error publishing release in idc panel" + Environment.NewLine + response);
                }
                else
                {
                    MessageBox.Show("Error publishing release in idc panel" + Environment.NewLine + wex.ToString());
                }
            }
            catch (Exception ex)
            {
                MessageBox.Show("Error publishing release in idc panel" + Environment.NewLine + ex.ToString());
            }

        }
//Deactivate a release
        //gameId:           Game id in IDCGames admin panel, provided by IDCGames
        //gameSecret:       Game keyword in IDCGames admin panel, provided by IDCGames
        //releaseID:        Release id (received in createRelease, getActiveRelease or listExistingReleases)
        void deactivateRelease(string gameId, string gameSecret)
        {
            WebClient wc = new WebClient();
            wc.Headers.Add("GameID", gameId);
            wc.Headers.Add("GameSecret", gameSecret);
            //Required in order to post parameters
            wc.Headers[HttpRequestHeader.ContentType] = "application/x-www-form-urlencoded";
            string ipParam = "";
            try
            {
                string deactivateReleaseApiUrl = "https://admin.idcgames.com/api/release/remove_active/";
                string deactivateReleaseJsonString = wc.UploadString(deactivateReleaseApiUrl, ipParam);
                parseReleaseActivationJson(deactivateReleaseJsonString);
            }
            catch (WebException wex)
            {
                string response = "";
                string statusCode = wex.Status.ToString();
                if (wex.Response != null)
                {
                    using (StreamReader r = new StreamReader(wex.Response.GetResponseStream()))
                    {
                        response = r.ReadToEnd();
                    }

                }
                if (response != "")
                {
                    MessageBox.Show("Error publishing release in idc panel" + Environment.NewLine + response);
                }
                else
                {
                    MessageBox.Show("Error publishing release in idc panel" + Environment.NewLine + wex.ToString());
                }
            }
            catch (Exception ex)
            {
                MessageBox.Show("Error publishing release in idc panel" + Environment.NewLine + ex.ToString());
            }

        }

Classes used in parsing code

public class CommonResponseClass {
        public string success { get; set; }
        public string message { get; set; }
    }
public class ReleaseClass
    {
        public int id { get; set; }
        public string name { get; set; }
        public string exe { get; set; }
        public string size { get; set; }
        public string published { get; set; }
        public bool active { get; set; }
        public string splash { get; set; }
        public string ico { get; set; }
        public int sync_status { get; set; }
    }
public class ReleasesClass {
        public List<ReleaseClass> data { get; set; }
    }
public class CreateOrModifyReleaseClass {
        public ReleaseClass data { get; set; }
    }
public class FtpAccountClass
    {
        public int id { get; set; }
        public int user { get; set; }
        public int rel { get; set; }
        public string rel_dir { get; set; }
        public int hours { get; set; }
        public string ip { get; set; }
        public string requested_at { get; set; }
        public string accepted_at { get; set; }
        public bool notified { get; set; }
        public string ftp_username { get; set; }
        public string ftp_password { get; set; }
        public string expire_at { get; set; }
        public int status { get; set; }
        public string rel_dlc { get; set; }
        public string created_at { get; set; }
        public string updated_at { get; set; }
    
public class PublishReleaseResponseClass {
        public string success { get; set; }
        public List<string> errors { get; set; }
        public string sync_url { get; set; }
        public string json_url { get; set; }
    }
public class CheckSynchronizationResponseClass{
        public int status { get; set; }
        public List<SyncrhonizationProgressClass> progress { get; set; }
    }
public class SyncrhonizationProgressClass {
        public string file_name { get; set; }
        public int file_progress { get; set; }

        public string file_speed { get; set; }
        public string ip { get; set; }
    }
public class ReleaseActivationResponseClass
    {
        public string success { get; set; }
    }

Parse JSON Examples (Using newtonsoft)

private void parseReleasesJson(string releasesJsonString)
        {
            ReleasesClass releases;
            try
            {
                releases = JsonConvert.DeserializeObject<ReleasesClass>(releasesJsonString);
                showReleases(releases);
            }
            catch (Exception ex)
            {
                MessageBox.Show($"Invalid releases json data received from IDC Games panel:{Environment.NewLine}{releasesJsonString}");
            }
        }
private void parseCreateOrModifyReleaseJson(string releasesJsonString)
        {
            CreateOrModifyReleaseClass release;
            try
            {
                release = JsonConvert.DeserializeObject<CreateOrModifyReleaseClass>(releasesJsonString);
                showCreatedOrModifiedRelease(release);
            }
            catch (Exception ex)
            {
                MessageBox.Show($"Invalid create release json data received from IDC Games panel:{Environment.NewLine}{releasesJsonString}");
            }
        }

private void parseGetReleaseFTPAccountsJson(string ftpAccountsJsonString)
        {
            List<FtpAccountClass> ftpAccountsList;
            try
            {
                ftpAccountsList = JsonConvert.DeserializeObject<List<FtpAccountClass>>(ftpAccountsJsonString);
                showFtpAccounts(ftpAccountsList);
            }
            catch (Exception ex)
            {
                MessageBox.Show($"Invalid get release ftp accounts json data received from IDC Games panel:{Environment.NewLine}{ftpAccountsJsonString}");
            
private void parseCreateFtpAccountJson(string createFtpAccountJson)
        {
            CommonResponseClass createFtpAccountsResponse;
            try
            {
                createFtpAccountsResponse = JsonConvert.DeserializeObject<CommonResponseClass>(createFtpAccountJson);
                if (createFtpAccountsResponse.success != "false")
                {
                    MessageBox.Show("FTP account created");
                }
                else
                {
                    MessageBox.Show("Error creating FTP Account: " + createFtpAccountsResponse.message);
                }
            }
            catch (Exception ex)
            {
                MessageBox.Show($"Invalid create ftp account json data received from IDC Games panel:{Environment.NewLine}{createFtpAccountJson}");
            }
        }
private void parsePublishReleaseJson(string publishReleaseJson)
        {
            PublishReleaseResponseClass publishReleaseResponse;
            try
            {
                publishReleaseResponse = JsonConvert.DeserializeObject<PublishReleaseResponseClass>(publishReleaseJson);
                if (publishReleaseResponse.success != "false")
                {
                    //Synchronization status true, add your code here
                    synchronizationStarted(publishReleaseResponse);
                }
                else
                {
                    //Convert errors list to comma separated string to show the message with the errors
                    IList<string> errors = publishReleaseResponse.errors;
                    MessageBox.Show("Error publishing Release: " + string.Join(",", errors));
                }
            }
            catch (Exception ex)
            {
                MessageBox.Show($"Invalid publish release json data received from IDC Games panel:{Environment.NewLine}{publishReleaseJson}");
            }
        }
private void parseCheckSynchronizationJson(string checkSynchronizationJson)
        {
            CheckSynchronizationResponseClass checkSynchronizationResponse;
            try
            {
                checkSynchronizationResponse = JsonConvert.DeserializeObject<CheckSynchronizationResponseClass>(checkSynchronizationJson);
                if (checkSynchronizationResponse.status == 1)
                {
                    synchronizationFinished();
                }
                else
                {
                    showSynchronizationStatus(checkSynchronizationResponse);
                }
            }
            catch (Exception ex)
            {
                MessageBox.Show($"Invalid check synchronization json data received from IDC Games panel:{Environment.NewLine}{checkSynchronizationJson}");
            }
        }
 private void parseReleaseActivationJson(string releaseActivationJson)
        {
            ReleaseActivationResponseClass releaseActivationResponse;
            try
            {
                releaseActivationResponse = JsonConvert.DeserializeObject<ReleaseActivationResponseClass>(releaseActivationJson);
                if (releaseActivationResponse.success != "false")
                {
                    //activation/deactivation success true, add your code here
                    showReleaseActivationResponse(releaseActivationResponse);
                }
                else
                {
                    MessageBox.Show("Error activating release.");
                }
            }
            catch (Exception ex)
            {
                MessageBox.Show($"Invalid release activation json data received from IDC Games panel:{Environment.NewLine}{releaseActivationJson}");
            }
        }
← Releases WorkflowGlossary →
  • API calls examples
  • Classes used in parsing code
  • Parse JSON Examples (Using newtonsoft)
How to Integrate a Game
All Documentation
How to integrate a game at idcgames.comComing soon
Facebook Open Source
Copyright © 2021 IDC/Games S.L.