Hi- I'm getting started with the Schoology API. I was able to successfully authenticate and fetch course data using 2-legged oauth, and was wondering how I can get the user's ID that the credentials belong to. I was able to get mine by logging into the website and copying it from my profile link, but there's got to be a way to do this from the API, right?
Thanks!
Dominic
Solved! Go to Solution.
For development, if you are playing around and already have the user's first and last name, you could use the user search endpoint given a first and last name, and assume the first entry returned is the correct person:
These other calls are supported, as well. Please read their description for more information.
Path | GET https://api.schoology.com/v1/users/me |
Description | A shortcut for GET users/{user_id} where {user_id} is the user ID of the current API user. |
Path | GET https://api.schoology.com/v1/app-user-info |
Description | If the user has an active Schoology web session, it returns the user id for the passed OAuth tokens and the Schoology web session timestamp. Use this information to validate the given access tokens for the logged in user and to check if the user has an active Schoology web session |
For development, if you are playing around and already have the user's first and last name, you could use the user search endpoint given a first and last name, and assume the first entry returned is the correct person:
These other calls are supported, as well. Please read their description for more information.
Path | GET https://api.schoology.com/v1/users/me |
Description | A shortcut for GET users/{user_id} where {user_id} is the user ID of the current API user. |
Path | GET https://api.schoology.com/v1/app-user-info |
Description | If the user has an active Schoology web session, it returns the user id for the passed OAuth tokens and the Schoology web session timestamp. Use this information to validate the given access tokens for the logged in user and to check if the user has an active Schoology web session |
/users/me looks like exactly what I'm looking for. not sure why that's burried so deep in the docs. thank you!