cancel
Showing results for 
Search instead for 
Did you mean: 
Highlighted
Community Member

Need help to create a Canvas user

Jump to solution

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": {}
}
}

Tags (5)
1 Solution

Accepted Solutions
Highlighted
Adventurer II

Hi Wendy --

It looks to me like you should have 'unique_id' instead of 'unique_login' in your data above. 

--Colin

View solution in original post

3 Replies
Highlighted
Community Coach
Community Coach

Hi wendy.lin@unlv.edu‌...

I am not sure of an answer for you, but I wanted to let you know that I am going to share your question with the https://community.canvaslms.com/groups/admins?sr=search&searchId=3f07e13e-9d5f-47b3-b808-3ce30786006...‌ and https://community.canvaslms.com/groups/canvas-developers?sr=search&searchId=53ca5c3d-529a-4c80-b2c5-...‌ groups here in the Canvas Community in hopes that your question will get additional visibility.  I hope this helps, and good luck!

Highlighted
Adventurer II

Hi Wendy --

It looks to me like you should have 'unique_id' instead of 'unique_login' in your data above. 

--Colin

View solution in original post

Highlighted

Hello wendy.lin@unlv.edu‌...

We have not heard from you since you first posted this question to the Canvas Community on February 24th.  Have you had a chance to review the response from 50581462‌?  If so, did his response help to answer your question?  Or, are you still seeking help with your initial question?  If Colin's reply helped to answer your question, please go ahead and mark his response as "Correct".  However, if you are still looking for help, please post a message below so that members of the Canvas Community can continue to help you with your question.  For now, because there hasn't been any new activity in this thread for over a month, I am going to mark your question as "Assumed Answered", but that won't prevent you or others from posting additional replies below.  I hope that's okay with you.  Looking forward to hearing from you soon, Wendy!

Top Kudoed Authors
Labels