Peter, thanks for your reply.
I have added the ?as_user_id=user_id to my POST call but I still get the Unauthorized issue.
First, my user account is an admin account.
Perhaps it has something to do with this sentence in the API documentation:
In order to masquerade via the API, the calling user must have the "Become other users" permission
I searched for this permission in our role "Account Admin" and I cannot find it. The only thing I find is one called "Users - act as" and all admin accounts already have it.
I found another side:
Canvas Developers
where it says:
The workflows which leverage API can be further automated or simplified by obtaining an admin token with the “become other users” permission.
My questions are
Could this be why I'm getting the unauthorized response from the server?
Where do I set the "become other users" permission for an account in the UI in Canvas?
How do I obtain an admin token with this “become other users” permission.? I know I can generate an access token for my account but there is no option there for giving this permission.
Thanks