User-2004102533 posted
I am using OAUTH2 for the first tme. Looking at TD Ameritrade developer site I created this POST
using RestSharp;
[HttpPost]
public void Post([FromBody]string value)
{
/* using RestSharp; // https://www.nuget.org/packages/RestSharp/ */
var client = new RestClient("https://api.tdameritrade.com/v1/oauth2/token");
var request = new RestRequest(Method.POST);
request.AddHeader("cache-control", "no-cache");
request.AddHeader("content-type", "application/x-www-form-urlencoded");
request.AddParameter("application/x-www-form-urlencoded", "grant_type=refresh_token&refresh_token= refreshToken&client_id = AMNEH3TKP@AMER.OAUTHAP", ParameterType.RequestBody);
IRestResponse response = client.Execute(request);
int FakeMAperiod = 10;
}
Can I put this code in my GET statement as the front end executes the GET. I do not think I can put a POST in the GET