-
Notifications
You must be signed in to change notification settings - Fork 0
Getting Started
This is a Step-By-Step Getting Started, that will help you setting up your first running projects using chayns® and the chayns® Backend API.
- chayns® site (free)
- chayns® partner account (tspn)
- webserver (local-)
- Microsoft Visual Studio / NodeJS
Clone or download the project from this repository.
Now choose a programming language for the backend (C# or NodeJS).
Make sure that the backend project and the index.html file located in the 'GetLocationInfo' folder can be reached through the WWW.
Follow the setup instructions for one of the backend projects and make the fetch-method in the index.html file pointing to your backend.
Go to the tapp administration and register a new tapp. Call it whatever you want, but in the url field, point at the index.html mentioned in the last step.
Select the required permission PublicInfo (The required permissions are listed for each api endpoint in the reference).
Note the tapp secret and installation code.
The secret is required for authorization later on, the installation code is used to install this developer tapp on any chayns site.
On your chayns site, go to the configuration -> Tapps -> Add Tapp -> External Content.
Choose any name. Where it says to add an URL, just insert the installation code you copied from the tapp administration.
Now you have to agree to the requested permissions of the tapp you set in the tapp administration. Go ahead an the tapp is installed.
Now go to the tapp and you will see a little intro text.
If you open the console while on the tapp, there is an error log caused by a 409-http error.
This is caused by the API because there is no tapp secret stored in the code.
Now open the project you selected and add the tapp secret of your developer tapp.
- C#: Go to Controllers -> LocationController.cs and insert the tapp secret into the 'Secret'-variable
- -> Rebuild the project
- NodeJS: Go to Src -> index.js and insert the tapp secret into the 'Secret'-variable
- -> Execute 'npm run server' via the NodeJS command line while in the NodeJS directory (if the server isn't running already)
Now you can open the tapp on your chayns site and you can see the location info plotted in a content__card element.
The current API version is v2.0 .
To use the chayns Backend API, you have to be registered in the Tobit.Software Partner Network (TSPN).
To register, please visit tobit.software/Partner.