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

OAuth2 Authentication: unknown client in Canvas?

Jump to solution

I'm developing an OAuth2 Authentication client-server program using Laravel. My code looks like this:

Route::get('/hi', function() {
   // Build the query parameter string to pass auth information to our request
   $query = http_build_query([
      'client_id' => 10,
      'redirect_uri' => '192.168.10.10/callback',
      'response_type' => 'code',
      'scope' => 'conference'
   ]);
   // Redirect the user to the OAuth authorization page
   return redirect('https://my.test.instructure.com/login/oauth2/auth?' . $query);
});

It redirects me to https://my.test.instructure.com/login/oauth2/auth?client_id=10&redirect_uri=192.168.10.10%2Fcallback...  as needed, but the result I get from that page confuses me:

while(1);{"error":"invalid_client","error_description":"unknown client"}

It seems Canvas doesn't recognise the client. Even though, on my machine at least, I've created a good many. Why exactly is this happening? I'm unfamiliar with what's going on here. 
Looking up similar instances says I need a developer key, and while I've created one now, I don't know what to do with it.

Any replies would be greatly appreciated.

Labels (1)
1 Solution

Accepted Solutions
pklove
Community Champion

Is this the same general thing as your post at https://community.canvaslms.com/message/166899-how-to-use-developer-key-for-oauth2-authentication 

If so, maybe we can keep replies in that thread.

View solution in original post

0 Kudos
2 Replies
pklove
Community Champion

Is this the same general thing as your post at https://community.canvaslms.com/message/166899-how-to-use-developer-key-for-oauth2-authentication 

If so, maybe we can keep replies in that thread.

View solution in original post

0 Kudos

Thanks for pointing out the duplication, pklove‌!   @sam_ofloinn , we've locked this post to prevent parallel and possibly duplicative threads from forming, and ask that people post their solutions and suggestions to https://community.canvaslms.com/thread/41040-how-to-use-developer-key-for-oauth2-authentication