Simplio3D

Authentication

The Simplio3D API uses JWT tokens for authentication. All API requests must include a valid access token.

Sign Up

POST/auth/signup
const response = await fetch(BASE_URL + '/auth/signup', {
  method: 'POST',
  headers: { 'Content-Type': 'application/json' },
  body: JSON.stringify({
    email: '[email protected]',
    password: 'securePassword123',
    name: 'John Doe'
  })
});

const data = await response.json();
// { "success": true, "userId": "...", "message": "Account created" }

Sign In

import { createClient } from '@supabase/supabase-js';

const supabase = createClient(SUPABASE_URL, SUPABASE_ANON_KEY);

const { data: { session }, error } = await supabase.auth.signInWithPassword({
  email: '[email protected]',
  password: 'securePassword123'
});

// Use session.access_token for all API calls
const accessToken = session.access_token;

Get Session

GET/auth/session
const response = await fetch(BASE_URL + '/auth/session', {
  headers: { 'Authorization': 'Bearer ' + accessToken }
});

const data = await response.json();
// { "success": true, "userId": "...", "email": "[email protected]" }

Using Access Tokens

Include the access token in the Authorization header for all authenticated requests:

Authorization: Bearer YOUR_ACCESS_TOKEN

Continue reading