Skip to content

Client-side Setup

To get access to the Backendless services, JavaScript applications must reference the backendless.js library. The library can be retrieved using any of the approaches listed below:

  • Use NPM:

    npm i backendless
    

  • Reference the library with the URLs below:

    non-compressed library (mapped to the latest released version):
    https://api.backendless.com/sdk/js/latest/backendless.js
    
    minified/compressed library:
    https://api.backendless.com/sdk/js/latest/backendless.min.js
    
    TypeScript library:
    https://api.backendless.com/sdk/js/latest/backendless.min.map
    https://api.backendless.com/sdk/js/latest/backendless.d.ts
    
    Specific versions of the library can be referenced with the following URL format:
    https://unpkg.com/backendless@4.0.8
    

If your application is hosted in the European Backendless hosting zone, add the following line of code. For the applications running in the North American data center, you do not need to set the URL - the SDK comes pre-configured with the North American API endpoint URL.

Backendless.serverURL = "https://eu-api.backendless.com"

Before the JavaScript client uses any of the APIs, the code must initialize the Backendless Application using the following call:

Backendless.initApp( application-Id, api-key )

Application ID and API Key

Values for the application-id and api-key arguments in the application initialization call must be obtained through the Backendless Console:

  1. Login to your account and select the application.
  2. Click the Manage icon from the vertical icon-menu on the left.
  3. The App Settings section is selected by default. The interface contains values for Application ID and API keys for each supported client-side environment.
  4. Use the Copy icon to copy the value into the system clipboard.
    appsettings-keys.zoom60

Make sure to use the "JavaScript API Key" for the api-key argument.