I want to fetch the users details using the Canvas id of particular user.

s525138
Community Novice

I am using  /api/v1/users/3282 API. But it gives different values for access_token of admin and access_token of instructor.

I want to retrieve the sis_login_id of instructor user.

Response when token is Instructors:

{

  "id": 3282,

  "name": "Shalu Yadav",

  "sortable_name": "Yadav, Shalu",

  "short_name": "Shalu Yadav",

  "avatar_url": "https:///images/thumbnails/204235/pSznz1ykIbNHM3hMa2Ecj263QZ1U8K1MOofpTESz",

  "locale": null,

  "permissions": {

    "can_update_name": true,

    "can_update_avatar": true

  }

}

Response when token is Admin’s :

{"id":3282,

"name":"Shalu Yadav",

"sortable_name":"Yadav, Shalu",

"short_name":"Shalu Yadav",

"sis_user_id":"919509883",

"integration_id":"461712",

"sis_login_id":"s525138",

"sis_import_id":332,

"login_id":"s525138",

"avatar_url":"https:///images/thumbnails/204235/pSznz1ykIbNHM3hMa2Ecj263QZ1U8K1MOofpTESz",

"locale":null,

"permissions":{

"can_update_name":true,

"can_update_avatar":true

}

}

Can anyone suggest me what to do?

Should I use some other API?

Thank you in advance! Smiley Happy