LEARNING

Getting started with Circle End-to-End Protection for CFA

Before you start

In order to use the Circle Service you must have a registered account.

You can register your free account here.

By registering you will be able to acquire the following needed to get started.

  • CustomerCode
  • AuthCode
  • AppKey
  • PrivateKey
  • PublicKey
  • Secret

Download

Download the Circle Service installer.

Testing

After installation, the Circle Service will be running as a Service Application for Windows and as a User Agent for macOS.

To check if everything went right, open any Web Browser and enter the following into the URL bar

http://127.0.0.1:31415

If it is running correctly you will see a simple text message.

Creating your first application

Create a file and name it firstapp.html

Open the file in a text editor of your choice. enter the following into the file.

<!DOCTYPE html>
<html lang="en">
<head>
  <meta charset="UTF-8">
  <meta http-equiv="X-UA-Compatible" content="IE=edge">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <title>First CircleService App</title>

  <script src="https://internal.gocircle.ai/api/demo/js/gocircle.ai-bundle.js"></script>
  <script src="https://internal.gocircle.ai/api/demo/js/gocircle.ai.js"></script>
</head>
<body>
  <h2>My First CircleService App</h2>
  <p id="runningResult"></p>

  <script src="./firstapp.js"></script>
</body>
</html>

Once that has been done, in the same folder create a new file and name it firstapp.js

Enter the following into your firstapp.js file

async function checkCircleServiceIsRunning() {
  let isRunning = await Circle.isServiceRunning();
  if (isRunning) {
    document.getElementById('runningResult').innerText = 'CircleService is running!';
  } else {
    document.getElementById('runningResult').innerText = 'Can not find CircleService!';
  }
}

(function() {
  checkCircleServiceIsRunning();
})();

Open firstapp.html in your web browser by dragging and dropping it into the browser.

If everything is running properly you should see the following:

You now have your first app running!

Most Circle SDK methods will require you to obtain a token. You can use the following guide for obtaining your token.

Getting your Token