Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Documentation for (and examples of) using the Khan Academy API
PHP JavaScript CSS Python PLSQL HTML Other
Branch: master

Address bug reports in the new API client.

Summary:
1. Change response.json() to response.text so there's no crash on timeout.
2. Remove "format=json" parameter since it fails with csilvers' new arg validation.

Addresses: https://app.asana.com/0/27216215224639/42347977167518/f

Test Plan:
Ensure test.py completes the authentication process successfully.
Ensure subsequent API calls are successful.

Reviewers: alan

Reviewed By: alan

Subscribers: csilvers

Differential Revision: https://phabricator.khanacademy.org/D19747
latest commit d4ec48a4a6
@hblumberg hblumberg authored

README.md

Khan Academy API Documentation and Examples

Documentation

Examples

All example code is MIT licensed.

  1. python test.py
  2. Enter your consumer key and secret
  3. Enter the Khan Academy url you want to test against (unless you're running a local version, this'll be http://www.khanacademy.org)
  4. A browser will pop up for you to walk through the authentication flow. When done, it will redirect you to a page that says "Ok" and in the URL there will be two parameter values you need: oauth_token and oauth_token_secret.
  5. Go back to the test.py command line and enter your new token and secret.
  6. You'll now have a loop that lets you run Khan Academy API queries, authenticated as the user you logged in as.
  7. Examples:

Something went wrong with that request. Please try again.