Need Canvas courses user-info course-info

400 Views Asked by At

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.

1

There are 1 best solutions below

0
On

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