Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

schoology

Package Overview
Dependencies
Maintainers
1
Versions
7
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

schoology

Format requests to the Schoology API

  • 0.1.5
  • latest
  • Source
  • npm
  • Socket score

Version published
Maintainers
1
Created
Source

schoology

Format requests to the Schoology API

Installation

npm i schoology -S

Usage

To consume the Schoology API, you'll need an API key and secret. Find these by logging in to schoology and navigating to /api (typically https://app.schoology.com/api or https://[your district].schoology.com/api)

  1. Instantiate the client like this:

    import SchoologyAPI from 'schooology'
    
    const client = new SchoologyAPI(key, secret,  site_base?, api_host?)
    

    key and secret are required. If you log in to a unique district website eg. https://district123.schoology.com then send that as the third argument.

    You probably don't need to send api_host but it can be overridden as the fourth argument here.

  2. Obtain a request token

    await client.getRequestToken()

    The SchoologyAPI instance stores the response token for subsequent requests.

  3. Complete Oauth flow

    This means redirecting the user to login at their schoology site where they will be prompted to approve access to their schoology account. Use SchoologyAPI to generate the correct redirect URL like this:

    const url = client.getConnectURL(return_url)

    After the user approves access, the schoology site will redirect the user back to return_url.

  4. Exchange the authorized request token for an access token.

    await client.getAccessToken()

    The SchoologyAPI instance stores the response token for subsequent requests.

  5. Make requests!

    const userInfo = await client.makeRequest('get', '/app-user-info')

FAQs

Package last updated on 03 Feb 2021

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc