AnsweredAssumed Answered

Need help to create a Canvas user

Question asked by Wendy Lin on Feb 24, 2017
Latest reply on Apr 14, 2017 by chofer@morainepark.edu

I am new to Canvas and I try to understand how to create a new user through API call. I have read the thread 7475 (API for creating new users ) and I still run into the error below. I am not sure what I am doing wrong here. 

 

API: https://unlv.instructure.com/api/v1/accounts/1/users 

HTTP method: post

I specified two tokens in Headers, Authorization and content-type

Body:

{"user" : {
"name" : "Wendy Test",
"short_name" : "Wendy"
},
"pseudonym" : {
"unique_login" : "wendytest@unlv.edu"
}
}

 

Here is the response:

{
"errors": {
"user": {
"pseudonyms": [
{
"attribute": "pseudonyms",
"type": "invalid",
"message": "invalid"
}
]
},
"pseudonym": {
"unique_id": [
{
"attribute": "unique_id",
"type": "too_short",
"message": "too_short"
},
{
"attribute": "unique_id",
"type": "invalid",
"message": "invalid"
}
]
},
"observee": {}
}
}

Outcomes