Skip to main content

Configure authentication

Read Authentication and project scope before creating credentials.

  1. Accept an invitation and sign in to the application.
  2. Select the intended project.
  3. Create a COLLECT key for an embedded SDK, or a SERVER key for a backend integration, with only the needed scopes.
  4. Use the API URL for the same environment.

Install the CLI with npm install -g @slnka/cli@1.0.0-beta.4. It accepts slnka auth login --project PROJECT_ID --server-url https://api.slnk.ma and prompts for a key. It stores the API URL and defaultProject in ~/.slnkarc; this local setup does not validate the key over the network. SLNKA_API_KEY, SLNKA_PROJECT and SLNKA_SERVER_URL override the saved configuration. Keep the configuration private.

--server-url is available from @slnka/cli 1.0.0-beta.4; check slnka auth login --help if you run an older release.