docs
  1. SCAYLE Resource Center
  2. Add-on API
  3. Getting Started
  4. Authentication

Authentication

To use the Add-on API you need to authenticate your requests with an API token. This brief guide explains how to create an API token and how to access the Add-on API using your token.

  • API Endpoint: To access the Add-on API, use the URL https://{{tenant-space}}.panel.scayle.cloud/api/v1/external/add-ons/{{path-object}}.

Creating an API token

In the SCAYLE Panel go to Add-ons > My First Add-on > Edit > API-Tokens > Create token.

Enter a brief note explaining what you use the token for. This way you can easily identify it when editing or rejecting it.

Your API tokens grant many privileges, so it is important to use and store them in a secure way. Do not use your token in client-side code or any publicly accessible areas like Git repositories.

Adding an Add-on Token

Accessing the API

Required Headers for API Requests

X-Access-Token

To authenticate your requests, you HAVE to send the HTTP Header X-Access-Token with your API token. There is no additional password required.

X-Add-on-Name

The HTTP Header X-Add-on-Name MUST contain the identifier of your Add-on.

Locating your the Add-on's identifier in the SCAYLE Panel:

In the SCAYLE Panel go to Add-ons > [Add-on] > Edit and find the identifier. (see screenshot below)

Finding the Add-on'sidentifier

Accept: application/json

The Accept: application/json HTTP header informs the server that a response in JSON format is desired and can be handled by the client.

API endpoint Structure & URL Format

The API endpoint URL to access the Add-on API contains

https://{{tenant-space}}.panel.scayle.cloud/api/v1/external/add-ons/{{path-object}}

All API requests MUST be made over HTTPS. Calls made over plain HTTP will fail.

API requests without authentication will also fail.

Example API request

curl --location 'https://acme-live.panel.scayle.cloud/api/v1/external/add-ons/logo' \
     --header 'X-Add-on-Name: my-first-addon' \
     --header 'Accept-Language: de' \
     --header 'Accept: application/json' \
     --header 'X-Access-Token: ••••••'