-
Notifications
You must be signed in to change notification settings - Fork 74
Invalid request token using Flask example #137
Comments
I'm no expert on this code, or flask, but I believe the error means that you have to run this code actually as part of a flask request -- you can't just call the functions via the CLI. So you'll need to write a program that uses this in its flask route, and then visit the appropriate url in your browser (or maybe use |
@csilvers is right in that you should be using this as part of a flask request. It is not designed to be used via the CLI. Your first line This example bootstraps getting the
Assuming you have installed required dependencies (Flask and rauth), that will run a server that can be accessed at If you just want to use a command line to access your own students' data, you could look at my package at khan_api_wrapper. |
After reviewing Khan#137, I thought it may be a good idea to include a README for the example so that API users have a better reference.
After reviewing Khan#137, I thought it may be a good idea to include a README for the example so that API users have a better reference.
I used the Flask example in this repo, only editing the values
CONSUMER_KEY
andCONSUMER_SECRET
on lines 14 and 15 ofkhan_api.py
, respectively. I then run:where
abc123
is my actual consumer key.I tried troubleshooting it, and got the following three results:
I read the docstring for
KhanAcademySignIn
and the comment block that follows it, but I don't understand it. Do I need to flesh out the example more, or is there some server-side issue going on?Thanks for teaching the kids,
The text was updated successfully, but these errors were encountered: