How to create user using api?

 

URL  :https://canvas.instructure.com/api/v1/accounts/:accountId/users

Request:

{
'user' : {
'name' : 'Sunil Patil',
'short_name' : 'Sunil',
'pseudonym' : {
'unique_id': 'sunil@gmail.com',
'password' : "12345678"
}
}

 

Response:

{
    "errors": {
        "user": {
            "pseudonyms": [
                {
                    "attribute""pseudonyms",
                    "type""invalid",
                    "message""invalid"
                }
            ],
            "name": [
                {
                    "attribute""name",
                    "type""blank",
                    "message""blank"
                }
            ],
            "terms_of_use": [
                {
                    "attribute""terms_of_use",
                    "type""accepted",
                    "message""accepted"
                }
            ]
        },
        "pseudonym": {
            "unique_id": [
                {
                    "attribute""unique_id",
                    "type""not_email",
                    "message""not_email"
                }
            ]
        },
        "observee": {},
        "pairing_code": {},
        "recaptcha"null
    }
}
 
after runing this API this above response is display. Please suggest what is the issue.
 
Labels (1)
0 Likes