Learn R Programming

vvcanvas (version 0.0.8)

canvas_authenticate: Authenticate with Canvas LMS API

Description

This function handles authentication with the Canvas LMS API. It uses the provided API key and base URL, or falls back to the CANVAS_API_KEY and CANVAS_BASE_URL environment variables if none are provided.

Usage

canvas_authenticate(api_key = canvas_api_key(), base_url = canvas_base_url())

Value

A list containing the authenticated 'api_key' and 'base_url'.

Arguments

api_key

The API key for authenticating with the Canvas LMS API. Defaults to the CANVAS_API_KEY environment variable.

base_url

The base URL of the Canvas instance. Defaults to the CANVAS_BASE_URL environment variable.

Examples

Run this code
if (FALSE) {
# Authenticate with the Canvas LMS API
api_key <- "your_api_key"
base_url <- "https://canvas.example.com"
canvas <- canvas_authenticate(api_key, base_url)
}

Run the code above in your browser using DataLab