Quick Start Guide

Get started with Looping Binary API in under 5 minutes. This guide will walk you through creating an account, generating API keys, and making your first request.

Prerequisites

  • Basic knowledge of REST APIs
  • A programming language (JavaScript, Python, etc.)
  • 5 minutes of your time

1Create an Account

Sign up for a free Looping Binary admin account to get started.

2Generate API Key

After logging in, navigate to the API Keys section in your dashboard and create a new API key.

Steps:
  1. Go to Dashboard → API Keys
  2. Click "Generate New Key"
  3. Give it a name (e.g., "Production Key")
  4. Select permissions (read, write, admin)
  5. Copy and save your key securely

3Set Environment Variable

Store your API key securely in an environment variable:

.env
LB_API_KEY=your_api_key_here

4Make Your First Request

Let's authenticate a user using the Login endpoint:

JavaScript
const response = await fetch('https://api.loopingbinary.com/api/auth/login', { 
  method: 'POST',
  headers: { 
    'Content-Type': 'application/json',
    'x-api-key': process.env.LB_API_KEY
  },
  body: JSON.stringify(({ 
    email: 'user@example.com',
    password: 'password123'
  })
});

const { user, token } = await response.json();
console.log('User:', user);
console.log('Token:', token);

Expected Response:

{
  "user": {
    "id": 1,
    "email": "user@example.com",
    "fullName": "John Doe",
    "role": "USER"
  },
  "token": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9..."
}

5Use the Token

Use the JWT token for authenticated requests:

JavaScript
const userResponse = await fetch('https://api.loopingbinary.com/api/auth/me', { 
  headers: { 
    'Authorization': `Bearer ${token}`
  }
});

const userData = await userResponse.json();
console.log(userData);

Congratulations! You're all set! 🎉

You've successfully made your first API request. Now explore the API reference to learn about all available endpoints.