Hello! I need to export a list of all users that includes their last_login attribute, and hopefully find a way to reset the password or any user that hasn't logged in for a set period of time - say 180 days.
I can pull the first 10 users with the call below but can't seem to get it to the next page of results. Every variation I have tried so far gives me the error "{"status: unauthenticated","errors":[{"message":"user authorization required"}]}" - even though I'm passing my token and authenticate successfully for the first page or results. Has anyone run into this, or can you tell me what I'm doing wrong? I'm new to Canvas and the API so don't have much experience yet.
My command:
curl https://myuniversity.instructure.com/api/v1/accounts/1/users?include[]=last_login -G -H 'Authorization: Bearer This-Is-My-Super-Secret-Token'
Command I'm trying to get the next page of results that fails:
curl https://myuniversity.instructure.com/api/v1/accounts/1/users?include[]=last_login&page=2&per_page=10 \ -G -H 'Authorization: Bearer This-Is-My-Super-Secret-Token'
This discussion post is outdated and has been archived. Please use the Community question forums and official documentation for the most current and accurate information.