cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
z_dusatko
Community Participant

What are redirect URIs in add developer key

Jump to solution

Hi there,

we are trying to use one dev key/token for multiple redirect URIs. In these both docs here
How do I add a developer key for an account? 

and
OAuth2 Endpoints - Canvas LMS REST API Documentation 

Redirect URIs is a list of either domains or subdomains (I assume new line separated). 

In our settings we left "Redirect URI (legacy):" empty and in our "Redirect URIs:" we listed multiple domains

for example:

https://subdomain1.tlt.utah.edu

https://subdomain2.tlt.utah.edu

and our actual redirect_uri in application was https://subdomain1.tlt.utah.edu/outcomes/api/canvas/123456

Unfortunately this gave us Canvas error:

while(1);{"error":"invalid_request","error_description":"redirect_uri does not match client settings"}

when we updated "Redirect URI (legacy):" to https://subdomain1.tlt.utah.edu/outcomes/api/canvas
our app at subdomain1.tlt.utah.edu worked great but not on other domains.

Would anybody know what we are doing incorrectly?

Thanks,

Zbynek

 

1 Solution

Accepted Solutions
pklove
Community Champion

I tried a few things, but like you, despite what the docs seem to be saying, sub-domains do not work unless I list them explicitly.

As far as I can see, you need to enter all of the redirect URLs you want to use in the Redirect URIs box.

View solution in original post

0 Kudos
4 Replies
pklove
Community Champion

I just list all the redirect URLs in the RedirectURIs box.

I don't see how it could work with just domains because Canvas wouldn't have any idea of the actual URL you are using to handle the redirect.

z_dusatko
Community Participant

Hi Peter,

thanks for your reply. I thought the actual URL would be the parameter redirect_uri in GET login/oauth2/auth. The description of this parameter is confusing for me:
"The domain of this URL must match the domain of the redirect_uri stored on the developer key, or it must be a subdomain of that domain."

Thanks,

Z.

pklove
Community Champion

Oh, sorry, I see what you mean now.  We still list all the URLs, but I now see that we should only have to have the domains.

I'll have a try later and see if I get the same problem as you.

pklove
Community Champion

I tried a few things, but like you, despite what the docs seem to be saying, sub-domains do not work unless I list them explicitly.

As far as I can see, you need to enter all of the redirect URLs you want to use in the Redirect URIs box.

View solution in original post

0 Kudos