Showing results for 
Search instead for 
Did you mean: 
Surveyor II

as_user_id not working

Good morning,

I've been working on a process to set notifications to off for new parent-observer accounts, and am using the following URL in a PUT to flip the bits, but get an error


The error I get back is "Invalid as_user_id". The user who's token I'm using is a full admin, so they should be able to masquerade. The channel ID and user ID being passed above have been verified.

Other calls to the API that do not use the as_user_id seem to be working fine.

I had this working, I thought, a few weeks back, but can't seem to get it going now. 

Thanks for any help offered.


Labels (1)
Tags (3)
4 Replies

Hi Brian,

You may be getting invalid as user id because you're passing in the wrong ID.  

Is the 102685 coming from your sis or the actual Canvas #sis user id

When looking at a user in Canvas if you look in the URL you can see Canvas's user ID assigned to that user at the end of the url‌278371_pastedImage_3.png

Hope this helps.


Hey  @bneporadny ‌,

Yep, I've checked that the user_id is the canvas user ID, and the channel ID is valid for that user.



Does it work when trying the Live API?

What scripting language?



I took a few minutes to try this out for you and I was able to get it to work without having to user the as_user_id parameter.


First thing I did was user the communication channels api to get the communication channel ID's associated with the particular user account I was testing with. 



I then went to the notification preferences api and plugged in one of the ID's I had gotten from above, entered in the notification I wanted to change and then the frequency and was able to successfully change the notification preference of that particular user without any issues.




Hope this helps. If not let me know what you're seeing and I'll be glad to continue to assist.