Back to Developers Home

Infinitys Public API


Usage and examples

How to create a Public Access Token

You will need a valid access token to successfully authenticate to Backend.Public API.

  • Login to Infinitys portal
  • Go to Administration > Public Access Token > New Public Acess Token
  • Fill in the form and press Save
  • Copy the Client Id and Client Secret from the token you have just created
  • Paste your Client Id and Client Secret in the configuration files at
    ~/Backend.Public/examples/nodejs/config.json for Node JS
    and
    ~/Backend.Public/examples/csharp/Backend.Public.Examples/Backend.Public.Examples/app.config for C#
  • You can rename the empty configurations files named app.config.original and config.json.original

Node.js examples

Installation

In order to run the node examples make sure you have node installed on your machine.

You can verify this opening cmd and typing

node -v

Run

To run the examples, navigate to the examples folder and run the scripts

cd ~/Backend.Public/examples/nodejs/
npm -i
node get-calendars.js

C# examples

Installation

To run the C# examples make sure you have Net Core Runtime 3.1 installed on your system.
can verify this opening cmd and typing

dotnet --version

Run

To run the examples navigate to the example folder and open the solution

cd ~/Backend.Public/examples/csharp/Backend.Public.Examples/Backend.Public.Examples
dotnet run Backend.Public.Examples.csproj

You can also open the solution file
~/Backend.Public/examples/csharp/Backend.Public.Examples/Backend.Public.Examples.sln
using Visual Studio IDE