SDK guides
| Package | Version | Use |
|---|---|---|
@slnka/web | 1.0.0-beta.18 | Browser collection with a COLLECT key |
@slnka/node | 1.0.0-beta.5 | Backend link management with a SERVER key |
@slnka/cli | 1.0.0-beta.4 | Command line, see Configure authentication |
JavaScript and TypeScript for browsers is the reviewed integration guide in this documentation build.
Node.js
import { SlnkaClient } from '@slnka/node';
const client = SlnkaClient.configure({
serverUrl: process.env.SLNK_API_URL!,
apiKey: process.env.SLNK_API_KEY!, // SERVER key, never shipped to a browser
});
const link = await client.links.create({
originalUrl: 'https://example.com/offer',
behavior: 'STANDARD',
});
console.log(link.shortUrl);
The key already determines the project. The request fields are those of the Links API.
Native iOS, Android, React Native and Java reference material is being reconciled with the current project and consent contracts. Those historical guides are not part of this published build. For an integration involving those platforms, contact support@slnk.ma and identify the exact SDK package/version and server environment.
A source checkout version is not proof of npm, Maven, CocoaPods or other registry publication. Pin a compatible released version approved for your environment; do not assume unreleased source features are available.