Skip to content
Zhongcai edited this page Dec 13, 2015 · 9 revisions

#####Create app > Secret If you have not already done so, first create an account on Cloudilly. Next create an app with a unique app identifier and a cool name. Once done, you should arrive at the app page with all the access keys for the different platforms. Under Web SDK, you will find the parameters required for your web application. "Secret" refers to the secret key shared between the developer and Cloudilly. It will be used by the server side token generator to sign the JSON Web Tokens. "Access" refers to the access keys to be embedded in the client side codes. "Domains" refer the URLs of your web application authorized to make use of the access key. Note that 'example.com' and 'www.example.com' are considered 2 separate URLs.

Web Console

#####Install JWT library Install JWT library using Composer

cd /var/www
curl -sS https://getcomposer.org/installer | php
php composer.phar require lcobucci/jwt

#####Update Secret Download the PHP files and save them to a local directory. Insert "Secret" obtained earlier into tokens.php where appropriate. tokens.php is the PHP file that dispenses out signed tokens at '/tokens' endpoint. The Web plugin will point to this endpoint to retrieve the token needed for subsequent authentication.

#####Update Access Insert your "App Name" and "Access" into custom.js where appropriate. Custom.js is the frontend Javascript that calls Cloudilly. Once done, upload all files to the PHP Apache server. Finally, navigate to the authorized URL on your browser to verify connection to Cloudilly. If you have setup the anonymous chat app for other platforms, you should also test if you can send messages across platforms, ie from Web to iOS / Android and vice versa.

Clone this wiki locally