authorization code request from a trusted client

Hi,

For getting authorization code request as per below method,

Firstly i called below url to get CODE

">community2.dynamics-int.com/.../authorizetrusted_client_id"&redirect_uri=community2.dynamics-int.com

Asking for Accept/Decline the request

https://community2.dynamics-int.com/?code=cmac_10_YXUow9q5N%2FV7Cj0OGRGRFWBv2eNhZj9LJ4IJYL50kUg&expires_in=299

After that i create POST curl request to get authorization code

CURL Req :

curl --location --request POST 'community2.dynamics-int.com/.../tokentrusted_client_secret”&code=”generate_code”' \

--header 'Content-Type: application/x-www-form-urlencoded' \

--header 'Cookie: AWSALB=9aDl2xOwzv8EPl2e/RNfMjm3Ag8T/I2wRkeCytN2bzsY8+Z5suM/WVjXAh6NHpa8eD7G/ZWVHLNTepxCcDP525M1YE9RhLyOeQVs+zFwAYWndZ6aSq4wk+bviNHS; AWSALBCORS=9aDl2xOwzv8EPl2e/RNfMjm3Ag8T/I2wRkeCytN2bzsY8+Z5suM/WVjXAh6NHpa8eD7G/ZWVHLNTepxCcDP525M1YE9RhLyOeQVs+zFwAYWndZ6aSq4wk+bviNHS' \

 

We are getting the response like this :
{

    "error": "invalid_request",

    "error_description": "The request is missing a required parameter, includes an invalid parameter value, includes a parameter more than once, or is otherwise malformed."

}

You can also go with below screenshot

1) without redirect_uri

2) with redirect_uri

& if you go with document there is some kind of different in Image & Calling procedure like

below image in post call it shows secret (key name) in parameter while if you go with calling procedure it is client_secret (key name) in parameter.

nevertheless, I tried with both but same response. 

Please have a look .