Registry / education / schoologyapi

schoologyapi

JSON →
library4.0.4jsnpmunverified

A Node.js client for the Schoology LMS REST API (v1). v4.0.4 (stable) wraps OAuth 1.0a signing and provides a simple request interface. Supports both CommonJS and ESM, includes TypeScript definitions. Released under MIT license. The only actively maintained Schoology API client on npm with OAuth token parsing.

npm install schoologyapi
INSTALL
IMPORT
SIG · SCHOOLOGYAPI
S
schoologyapi
educationjavascriptv4.0.4
harness data pending
Install & Compatibility
Where this runs

No compatibility data collected yet for this library.

Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

SchoologyAPI
import SchoologyAPI from 'schoologyapi'
const SchoologyAPI = require('schoologyapi')
ESM import works in Node ≥12. CommonJS require also supported but import preferred.
SchoologyAPI
const SchoologyAPI = require('schoologyapi')
import { SchoologyAPI } from 'schoologyapi'
Default export; named import not available.
SchoologyAPI
import SchoologyAPI from 'schoologyapi'
const client = new SchoologyAPI.default('key', 'secret')
No .default needed on import; the default export is the class.

Initializes the client with API credentials from environment variables and performs a GET request to fetch a user.

const SchoologyAPI = require('schoologyapi'); const client = new SchoologyAPI(process.env.SCHOOLOGY_API_KEY ?? '', process.env.SCHOOLOGY_API_SECRET ?? ''); (async () => { try { const user = await client.request('GET', '/users/13225459'); console.log(user); } catch (err) { console.error(err); } })();
Debug
Known issues
gotchaThe API key and secret are constructor arguments, not an options object.
fix
Pass two separate string arguments: new SchoologyAPI('key', 'secret')
affects: >=0.0.0
gotchaThe request method does not automatically prefix the base URL; you must include '/v1' in the URI parameter.
fix
Always start your URI with '/v1', e.g., '/v1/users'
affects: >=0.0.0
gotchaThe accessToken parameter must be an object with key and secret properties, not a string.
fix
Pass { key: '...', secret: '...' } for the third argument.
affects: >=0.0.0
Errors
Common errors & fixes
TypeError: SchoologyAPI is not a constructor
Using named import instead of default import.
fix
Use `import SchoologyAPI from 'schoologyapi'` or `const SchoologyAPI = require('schoologyapi')`.
Error: Invalid Schoology API key or secret
Missing or incorrect credentials passed to constructor.
fix
Ensure API_KEY and API_SECRET are correct strings from Schoology API settings.
Error: Not Found
URI missing '/v1' prefix or endpoint does not exist.
fix
Include '/v1' at start of URI and verify endpoint path.
Upgrade
Version history
4.0.4latest on npm
Audit
Dependencies

No dependency data recorded yet.

Agent activity
3 hits · last 30 days
node
2
Amazon
1
Resources
schoologyapi — npm install schoologyapi · libregistry