I have followed the Exact Online documentation to generate access token using authorization code using POST method as written in official documentation.
Documentation link: Get access token documentation

But for some reason, the response to this request is invalid and cannot generate access token. What could be the possible solutions?
Expected Outcome as per documentation:

{ code: "XTzM!IAAAACbPTzQJXwFhM"
, redirect_uri: ...
, grant_type: "authorization_code"
, client_id: "b81cc4de-d192-400e-bcb4-09254394c52a"
, client_secret: "n3G7KAhcv8OH"
}
Use the GET method instead of POST.
If that’s not working try to past the url with all the details present in the address bar of a browser. A form will be presented to you and fill in your username and password. After that take a careful look at the address bar. There you will find the token.
Btw why not use the implicit flow (use ‘token’ for grant_type). Access token is returned immediately.