Hi Team / @sujith I have written my http trigger function app i'm running it locally for testing.
var client = new RestClient("https://kite.trade"); var request = new RestRequest("/connect/login?v=3&api_key="+MyAPIKey, Method.Post); request.AddParameter("user_id", "myemail"); request.AddParameter("password", "mypass"); //request.AddParameter("pin", "DO NOT HAVE PIN"); request.AddParameter("redirect_uri", "http://127.0.0.1"); var response = client.Execute(request);
var locationHeader = response.Headers.FirstOrDefault(h => h.Name == "Location")?.Value?.ToString();
var uri = new Uri(locationHeader); var queryParams = uri.Query.TrimStart('?'); var queryString = HttpUtility.ParseQueryString(queryParams); var requestToken = queryString["request_token"];
getting locationHeader as null so not redirecting and getting refresh token. is there anay other way like oauth request to get it refresh token directly from backend? I will save my credentials into azure keyvault.