The Instructure Community will enter a read-only state on November 22, 2025 as we prepare to migrate to our new Community platform in early December.
Read our blog post for more info about this change.
Good day to everyone. I have the question of whether you can create a canvas account and then be assigned to a course. Validating the API: Users API The api requests what is /api/v1/accounts/:account_id/users , where I can not find my account_id (my account is a canvas.instructure account). What I want is to be able to send them an email so people can register and assign them to the course. thanks for your help
$rute = "canvas.instructure.com/api/v1/accounts/:account_id/users";
$prtts = array('pseudonym[unique_id]' => 'myemail@gmail.com');
$cURL = curl_init();
curl_setopt($cURL, CURLOPT_URL, $rute);
curl_setopt($cURL, CURLOPT_HEADER, true);
curl_setopt($cURL, CURLOPT_RETURNTRANSFER, true);
curl_setopt($cURL, CURLOPT_POST, true);
curl_setopt($cURL, CURLOPT_POSTFIELDS, $prtts);
curl_setopt($cURL, CURLOPT_HTTPHEADER, array(
'Content-Type: application/json',
'Authorization: Bearer MyToken' //here goes my token
));
$res = curl_exec($cURL);
var_dump($res);
curl_close($cURL); I understand that when sending my parameter, which is myemail@gmail.com, should I get an email to register?
Hi christian,
Back when Canvas first started they used to give a different account id for each institutions account. That has long based so when it comes to setting the account ID for calling an api you can either use 1 or you use self.
canvas.instructure.com/api/v1/accounts/1/users
canvas.instructure.com/api/v1/accounts/self/users
When creating an account via the user creation api you have two options you can set that would then send out an email to the user informing them of their account getting created.
Hope this helps.
Thank you very much, for the clarification, fix the file, but I still have the inconvenience that when sending the data by php, they do not perform the operation. similarly when trying to do Canvas Live API , but to put self or 1, it tells me that the token is not valid, but when I make another look like see my courses, if you show me the data, something will be failing? my token will not have the permission to send the creation of a new user?
Since I need to create the students directly in my courses.
Community helpTo interact with Panda Bot, our automated chatbot, you need to sign up or log in:
Sign inTo interact with Panda Bot, our automated chatbot, you need to sign up or log in:
Sign in
This discussion post is outdated and has been archived. Please use the Community question forums and official documentation for the most current and accurate information.