@futuredevsolutions/1get-sdk

    Link shortener SDK for
    any JavaScript framework

    Drop-in React component, vanilla JS client, and Web Component. Full TypeScript support, QR code generation, and privacy-first analytics built in.

    Zero-config React component

    Drop in <LinkShortener /> and get a fully styled, accessible shortening interface.

    Framework-agnostic core

    Use OneGetClient in Node.js, browsers, or any JavaScript runtime.

    Web Component

    Works with Vue, Angular, Svelte, Astro, or plain HTML via <one-get-shortener>.

    Full TypeScript support

    Comprehensive types and JSDoc comments for excellent IDE and AI coding support.

    Interactive playground

    Test the SDK functionality right here without installing anything.

    Interactive Demo
    Try the SDK without installation
    Equivalent SDK Code
    const result = await client.shorten({
      url: 'https://example.com',
      qr: { enabled: true }
    });

    Installation

    Get up and running in under 5 minutes.

    Install the package
    npm install @futuredevsolutions/1get-sdk

    Choose your framework

    Examples for React, vanilla JavaScript, and Web Components.

    React Component
    import { LinkShortener } from '@futuredevsolutions/1get-sdk/react';
    
    function App() {
      return (
        <LinkShortener
          apiKey={process.env.NEXT_PUBLIC_1GET_API_KEY}
          enableQrCode={true}
          theme="dark"
          onShorten={(result) => console.log(result)}
        />
      );
    }

    Full TypeScript definitions

    IntelliSense support and type checking for all SDK methods.

    Type Definitions
    interface ShortenOptions {
      url: string;
      slug?: string;
      qr?: QrOptions | boolean;
      metadata?: Record<string, string>;
    }
    
    interface QrOptions {
      enabled?: boolean;
      format?: 'svg' | 'png';
      size?: number;
      foreground?: string;
      background?: string;
      logo?: string;
      errorCorrection?: 'L' | 'M' | 'Q' | 'H';
    }
    
    interface ShortenResult {
      id: string;
      shortUrl: string;
      originalUrl: string;
      slug: string;
      qr?: {
        url: string;
        format: string;
      };
      createdAt: string;
    }

    Works with your stack

    Native support for React and Web Components that work everywhere.

    React
    react
    Native
    Next.js
    react
    Native
    Vue 3
    web-component
    Angular
    web-component
    Svelte
    web-component
    Astro
    react or web-component
    Vanilla JS
    core client

    Ready to integrate?

    Get your API key from the dashboard and start shortening links in minutes.