diff --git a/assets/js/common/api.js b/assets/js/common/api.js index 20d1d3c2..09c85418 100644 --- a/assets/js/common/api.js +++ b/assets/js/common/api.js @@ -16,6 +16,10 @@ ComunicWeb.common.api.makeAPIrequest = function(apiURI, params, requireLoginToke //Prepare the request URL var requestURL = ComunicWeb.__config.apiURL + apiURI; + //Add API service tokens + params.serviceName = ComunicWeb.__config.apiServiceName; + params.serviceToken = ComunicWeb.__config.apiServiceToken; + //Add login tokens to params if required if(requireLoginTokens){ //Get login tokens diff --git a/corePage/config/global.config.php b/corePage/config/global.config.php index 90686af2..75a0c9eb 100644 --- a/corePage/config/global.config.php +++ b/corePage/config/global.config.php @@ -13,5 +13,5 @@ $config['siteURL'] = "http://devweb.local/comunic/v2/"; //API config $config['API_URL'] = "http://devweb.local/comunic/api/"; -$config['API_SERVICE_NAME'] = "testService"; -$config['API_SERVICE_TOKEN'] = "testPasswd"; \ No newline at end of file +$config['API_SERVICE_NAME'] = "ComunicWeb"; +$config['API_SERVICE_TOKEN'] = "12XU67pJUlnNQ"; \ No newline at end of file diff --git a/index.php b/index.php index 22537884..1594e2b7 100644 --- a/index.php +++ b/index.php @@ -72,8 +72,10 @@ //Site URL siteURL: "", - //apiURL + //apiURL and credentials apiURL: "", + apiServiceName: "", + apiServiceToken: "", //Default language defaultLanguage: "en",