I am trying to get a token from Identity Server 3 through a Post Call from an application residing on another server.
I am posting the following values to https://mydomainhost.net/connect/token:
curl_setopt($curl, CURLOPT_POSTFIELDS, http_build_query(array(
'client_id' => 'myclientid',
'client_secret' => 'myclientsecret',
'redirect_uri' => 'http://myotherdomain.com/test.php',
'grant_type' => 'authorization_code'
)));
But the following error is being returned:
string(31) "{"error":"unauthorized_client"}"
I have changed the 'client_id' value to a username which is for sure not configured and get the following:
string(26) "{"error":"invalid_client"}"
I only did the test with a username which does not exist to see if I get a different result.
Can someone let me know if this is an error from the application calling Identity Server, or if it's from configuration within Identity Server please?
usually for this error message i check two things 1. client secret against the client id 2. whether the client is configured for authorization code flow.