OAUTH 2 3LO: unable to exchange authorization code for access token

Hi there. I’m trying to implement OAUTH 2 3LO for a REST API data extract.

https://developer.atlassian.com/cloud/jira/platform/oauth-2-3lo-apps/#2--exchange-authorization-code-for-access-token

I am following the OAUTH 2.0 steps and able to get an authorisation code, but getting an incorrect request parameters error when trying step 2. Exchange authorization code for access token.

{“error”:“invalid_request”,“error_description”:“Incorrect request parameters”}

I followed the syntax and tried different methods (cmd, powershell, postman) but still getting the incorrect request parameters error. what could be the root cause of the error? could it be incorrect syntax, or incorrect parameter values?

Hopefully you have the answer by now but in case not, I used a curl converter to get past this exact same message I was getting using c#. Here is the link to the curl converter I used: Convert curl commands to C# + HttpClient