Cant get avatar_url with the API

Jump to solution
rsalvarez
Community Novice

Hello!

I'm having a problem with the API. I'm trying to fetch all the users for a given course, but I want their avatar_url. In the documentation it's stated that including the "include[]" parameter with "avatar_url" as value will do the job but it doesn't always work.

More specifically, if I use an access_token what was manually generated for testing it gives the users with the avatar_url, but if I use an access_token generated by Oauth flow it gets the user without the avatar_url. The courses are ones in which the user that logged in is an instructor, so I doubt it's a permission issue. 

I've read the documentation but I've found nothing. Does someone know what the problem may be?

Thanks!

1 Solution
ColinMurtaugh
Community Champion

Hi Raúl --

There's a brand-new setting (still in beta at this point; to be released in production on Feb. 15th) that lets you allow includes[] parameters on API calls that use OAuth tokens. Currently the includes[] parameter is ignored when OAuth is used.  More details here:

https://community.canvaslms.com/docs/DOC-18353-canvas-release-notes-2020-02-15#jive_content_id_Devel... 

Hope this helps!

--Colin

View solution in original post