A) Did you tried using API Connector user-agent?

B) Did you run step by step or use logs to see what you was sending when doing the Get access token request? Are you sure you get the code correctly from the URL?