Scopes API client for the Mosaia SDK

Provides access to permission scopes available in the Mosaia platform. Scopes define the permissions that can be granted to OAuth clients and users.

import { Mosaia } from 'mosaia-node-sdk';

const mosaia = new Mosaia({ apiKey: 'your-api-key' });
const scopes = mosaia.scopes;

// Get all available scopes
const result = await scopes.get();
console.log('Available scopes:', result.data.scopes);

Constructors

Methods

Constructors

Methods

  • Get all available permission scopes

    Retrieves a list of all permission scopes available in the platform. These scopes can be used for OAuth authorization and permission management.

    Returns Promise<GetScopesPayload>

    Promise resolving to scopes list

    const result = await scopes.get();
    result.data.scopes.forEach(scope => {
    console.log(`Scope: ${scope.name} - ${scope.description}`);
    });

    When API request fails