AnsweredAssumed Answered

OAuth2 Authentication: unknown client in Canvas?

Question asked by Lee Newton on Nov 12, 2019
Latest reply on Nov 14, 2019 by Stefanie Sanders

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&response_type=code…  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.

Outcomes