Celebrate Excellence in Education: Nominate Outstanding Educators by April 15!
Found this content helpful? Log in or sign up to leave a like!
Hi Team,
Username: manoj_bhosale1@persistent.com
we are getting account_id as 102396 by heating this endpoint "https://canvas.instructure.com/api/v1/courses"
we are trying the same id to access the "Users" object but getting below error.
Solved! Go to Solution.
Hi @ManojBhosale,
You can use the accounts endpoint to list accounts you have access to. Alternatively, as shown in the example of the users call, you may be able to use the "self" identifier for the accound_id. You can also just look at the URL of your admin pages in the UI and see the ID listed there.
One thing to confirm though is whether you're actually an admin or not, as it's not quite clear in your post. Many API calls will only work for users who are Canvas admins.
-Chris
Hi @ManojBhosale,
Can you explain a bit more about what you're trying to do? The account_id is an internal identifier assigned by Canvas to a specific account/subaccount (not a user account, that's completely different). A somewhat simplified hierarchy is that enrollments tie to sections, sections tie to a course, a course ties to an account, an account ties to another account up to the root account for the school institution. Users would generally be considered to be associated with the root account. With all this being said, an account_id really isn't something you would generate. The only time you'd have a new account_id is if you create a new subaccount.
If you can tell us the goals you're trying to achieve it'll probably help one of us to guide you on the best direction to take, which APIs you'd need to use, etc.
-Chris
In this endpoint account_id is mentioned so where i can find the same to get the response from postman.
Please refer the below link to find the User object.
https://canvas.instructure.com/doc/api/users.html#method.users.api_index
Hi @ManojBhosale,
You can use the accounts endpoint to list accounts you have access to. Alternatively, as shown in the example of the users call, you may be able to use the "self" identifier for the accound_id. You can also just look at the URL of your admin pages in the UI and see the ID listed there.
One thing to confirm though is whether you're actually an admin or not, as it's not quite clear in your post. Many API calls will only work for users who are Canvas admins.
-Chris
To participate in the Instructure Community, you need to sign up or log in:
Sign In