0

I'm new with Canvas lms and just wondering if anyone know how to get the user info and course id. need some examples

Below is the link I found, but still can't figure out how to use this in my php to grab the user info. https://canvas.instructure.com/doc/api/file.object_ids.html

Thanks in advance.

markE
  • 102,905
  • 11
  • 164
  • 176
fguru
  • 71
  • 2
  • 9

1 Answers1

0

Suppose you have the OAuth2 ACCESS-TOKEN and your USER-ID, you can simply use HTTP GET requests to obtain this information.

In order to get your user info, you need to perform a GET request to the following URL: https://canvas.instructure.com/api/v1/users/<USER-ID>/profile?access_token=<ACCESS-TOKEN>

In order to get course id for the list of courses you belong to, you need to perform a GET request to the following URL: https://canvas.instructure.com/api/v1/courses?access_token=<ACCESS-TOKEN>

For more capabilities you can use the following API documentation: https://canvas.instructure.com/doc/api/index.html

Eyal
  • 1,748
  • 2
  • 17
  • 31