AnsweredAssumed Answered

API for creating new users

Question asked by Rithesh Shenthar on Oct 12, 2015
Latest reply on Mar 31, 2016 by pkreemer@sbctc.edu

My question is with respect to the creation of new users using the below API (Create a new user):

Users - Canvas LMS REST API Documentation

 

I need this for a new website where I will be creating users in ELMS automatically (self-registration) by making API calls from the Drupal Site to ELMS with the required info. So far I already have an account id and my own token for the course.(to which I am registered as Owner). I needed help in understanding where I'm going wrong in my API call, My API call returns {} and I see no new entries for the names I am trying to create ->

 

mozillas-MacBook-Pro:~ Rshenthar$ curl -X POST -H "Authorization: Bearer <Token>" 'https://canvas.instructure.com/api/v1/accounts/<account id>/users' -d '{name:Rithesh S,unique_id:r.shenthar@gmail.com,password:<password>,sis_user_id:rithesh_MOST_CENTER_2015}'

{}

mozillas-MacBook-Pro:~ Rshenthar$

mozillas-MacBook-Pro:~ Rshenthar$

mozillas-MacBook-Pro:~ Rshenthar$ curl -X POST -H "Authorization: Bearer <Token>" 'https://canvas.instructure.com/api/v1/accounts/<account id>/users' -d '{name:Rithesh S,unique_id:r.shenthar@gmail.com,password:<password>,sis_user_id:rithesh_MOST_CENTER_2015}’

{}

Outcomes