If you see the request format
POST /oauth2/access_token HTTP/1.1
Host: partner.path.com
Content-Type: application/x-www-form-urlencoded
Content-Length: <LENGTH>
grant_type=authorization_code&client_id=CLIENT&client_secret=SECRET&code=CODE
Content-Length
line is not required, in getting permanent access token
code=CODE
- was very confusing, and i see you can get temporary access token, but can't get permanent access token, in this line, capital CODE
MUST BE REPLACED WITH TEMPORARY ACCESS TOKEN
don't change grant_type=authorization_code
only
I think this will help you a lot