AnsweredAssumed Answered

{"errors":"Invalid as_user_id"}

Question asked by Jp Gorrono on Sep 3, 2015
Latest reply on Jun 24, 2016 by Mike Farnham

I can 'become' a user in the UI but when I try to use a token to do it in the API, I get this error:

 

curl -v "https://canvas.test.instructure.com/api/v1/users/self/activity_stream?as_user_id=99999999000000082" -H "Authorization: Bearer `cat sis@canvas-test`"

{"errors":"Invalid as_user_id"}

 

I've tried using the format (faked id here) "as_user_id=sis_user_id:322323" too...same result

 

in the 2nd case I got the user id via

 

curl -v "https://canvas.test.instructure.com/api/v1/accounts/99999999000000001/users?search_term=stuff" -H "Authorization: Bearer blahblah

 

What do I have wrong here?

 

Thanks

Outcomes