Ajax/ASP.net Oauth2 for Wrike API v3

I've been trying to work with the Wrike API, but I am having trouble getting my access token using Ajax or ASP.Net. I am currently using the "Wrike for Developers Documentation", and this is my first time working with Oauth2. There aren't any JavaScript or ASP.net examples and I could only find projects on GitHub for node.js and PHP.

I tried doing it via the ASP.net back end with C# I still get a error 400 bad request but when I take the request I made with it and put it into postman I am able to get the token. Here is the code I'm using. I'll update this question if I fix it completely.

Okay guys after a lot of time and effort I've found a solution. Rather than getting the access token using ajax and dealing with Cross Origin issues I decided to get the token via the back end C#. You will still need to parse the token var for the access token but that's easy to do. For reference the var token contains the information below (Wrike API Oauth2 documentation):