get__settings_user

GET /settings/user

Get User Settings

Retrieve the current user's settings. The user must be authenticated to access their settings.

TypeScript Client Library

// Using the Flashback TypeScript client
import { FlashbackClient } from '@flashback/client';

const client = new FlashbackClient({ accessToken: 'your-access-token' });

// Get user settings
try {
  const result = await client.settings.user.get();
  console.log('User settings:', result);
} catch (error) {
  console.error('Failed to get user settings:', error);
}

Code Samples

# You can also use wget
curl -X GET https://backend.flashback.tech/settings/user \
  -H 'Accept: application/json' \
  -H 'Authorization: Bearer {access-token}'

Example responses

200 Response

{
  "success": true,
  "settings": {
    "theme": "dark",
    "notifications": {
      "email": true,
      "push": false
    },
    "timezone": "UTC",
    "language": "en"
  }
}

404 Response

{
  "success": false,
  "message": "User not found"
}

500 Response

{
  "success": false,
  "message": "Internal server error",
  "error": "Database connection failed"
}

Responses

Status
Meaning
Description
Schema

200

User settings retrieved successfully

Inline

404

User not found

Inline

500

Internal server error

Inline

Response Schema

Status Code 200

Name
Type
Required
Restrictions
Description

» success

boolean

true

none

Indicates if the request was successful

» settings

object

true

none

User settings object containing key-value pairs

Status Code 404

Name
Type
Required
Restrictions
Description

» success

boolean

true

none

Always false for error responses

» message

string

true

none

Error message describing the issue

Status Code 500

Name
Type
Required
Restrictions
Description

» success

boolean

true

none

Always false for error responses

» message

string

true

none

Error message describing the issue

» error

string

false

none

Additional error details if available

DTOs

GetSettingsResponse

export interface GetSettingsResponse {
  success: boolean;
  // Using Record<string, any> for maximum flexibility - settings can contain any JSON-serializable data
  settings: Record<string, any>;
}

SettingsErrorResponse

export interface SettingsErrorResponse {
  success: false;
  message: string;
  error?: string;
}

Last updated

Was this helpful?